netapp_ontap.resources.s3_bucket API documentation
Description: Copyright &copy; 2020 NetApp Inc. All rights reserved …

# Module `netapp_ontap.resources.s3_bucket`

Copyright © 2020 NetApp Inc. All rights reserved.

## Overview

An S3 bucket is a container of objects. Each bucket defines an object namespace. S3 server requests specify objects using a bucket-name and object-name pair. An object consists of data, along with optional metadata and access controls, that is accessible using a name. An object resides within a bucket. There can be more than one bucket in an S3 server. Buckets that are created for the server are associated with an S3 user that is created on the S3 server.

## Examples

### Retrieving all fields for all S3 buckets of a cluster

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(S3Bucket.get_collection(fields="**")))

Try it out

    [
        S3Bucket(
            {
                "svm": {"uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1"},
                "size": 209715200,
                "logical_used_size": 157286400,
                "volume": {
                    "uuid": "51276f5f-7c6d-11e9-97e8-0050568ea123",
                    "name": "fg_oss_1558514455",
                },
                "qos_policy": {
                    "name": "vs0_auto_gen_policy_39a9522f_ff35_11e9_b0f9_005056a7ab52",
                    "uuid": "39ac471f-ff35-11e9-b0f9-005056a7ab52",
                },
                "name": "bucket-2",
                "encryption": {"enabled": False},
                "uuid": "527812ab-7c6d-11e9-97e8-0050568ea123",
                "comment": "S3 bucket.",
            }
        ),
        S3Bucket(
            {
                "svm": {"uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1"},
                "size": 1677721600,
                "logical_used_size": 0,
                "volume": {
                    "uuid": "a36a1ea7-7e06-11e9-97e8-0050568ea123",
                    "name": "fg_oss_1558690256",
                },
                "qos_policy": {
                    "name": "vs0_auto_gen_policy_39a9522f_ff35_11e9_b0f9_005056a7ab52",
                    "uuid": "39ac471f-ff35-11e9-b0f9-005056a7ab52",
                },
                "name": "bucket-1",
                "encryption": {"enabled": False},
                "uuid": "a8234aec-7e06-11e9-97e8-0050568ea123",
                "comment": "bucket2",
            }
        ),
        S3Bucket(
            {
                "svm": {"uuid": "ee30eb2d-7ae1-11e9-8abe-0050568ea123", "name": "vs2"},
                "policy": {
                    "statements": [
                        {
                            "effect": "allow",
                            "conditions": [
                                {"operator": "ip_address", "source_ips": ["1.1.1.1/10"]}
                            ],
                            "actions": ["*"],
                            "resources": ["bucket-3", "bucket-3/*"],
                            "principals": ["Alice"],
                            "sid": "fullAccessForAliceToBucket",
                        }
                    ]
                },
                "size": 1677721600,
                "logical_used_size": 1075838976,
                "volume": {
                    "uuid": "a46a1ea7-7e06-11e9-97e8-0050568ea123",
                    "name": "fg_oss_1558690257",
                },
                "qos_policy": {
                    "name": "vs0_auto_gen_policy_39a9522f_ff35_11e9_b0f9_005056a7ab52",
                    "uuid": "39ac471f-ff35-11e9-b0f9-005056a7ab52",
                },
                "name": "bucket-3",
                "encryption": {"enabled": False},
                "uuid": "19283b75-7ae2-11e9-8abe-0050568ea123",
                "comment": "bucket3",
            }
        ),
    ]

### Retrieving all S3 buckets of a cluster ordered by size

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(S3Bucket.get_collection(order_by="size")))

Try it out

    [
        S3Bucket(
            {
                "svm": {"uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1"},
                "size": 83886080,
                "name": "bb1",
                "uuid": "754389d0-7e13-11e9-bfdc-0050568ea123",
            }
        ),
        S3Bucket(
            {
                "svm": {"uuid": "ee30eb2d-7ae1-11e9-8abe-0050568ea123", "name": "vs2"},
                "size": 838860800,
                "name": "bb2",
                "uuid": "19283b75-7ae2-11e9-8abe-0050568ea123",
            }
        ),
        S3Bucket(
            {
                "svm": {"uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1"},
                "size": 1677721600,
                "name": "bucket-1",
                "uuid": "a8234aec-7e06-11e9-97e8-0050568ea123",
            }
        ),
    ]

### Retrieving all S3 buckets of a cluster with name "bb2"

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        print(list(S3Bucket.get_collection(name="bb2")))

Try it out

    [
        S3Bucket(
            {
                "svm": {"uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1"},
                "name": "bb2",
                "uuid": "087d940e-7e15-11e9-bfdc-0050568ea123",
            }
        ),
        S3Bucket(
            {
                "svm": {"uuid": "ee30eb2d-7ae1-11e9-8abe-0050568ea123", "name": "vs2"},
                "name": "bb2",
                "uuid": "19283b75-7ae2-11e9-8abe-0050568ea123",
            }
        ),
    ]

### Retrieving the specified bucket associated with an SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = S3Bucket(
            uuid="527812ab-7c6d-11e9-97e8-0050568ea123",
            **{"svm.uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123"}
        )
        resource.get()
        print(resource)

Try it out

    S3Bucket(
        {
            "svm": {"uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123", "name": "vs1"},
            "size": 209715200,
            "logical_used_size": 157286400,
            "volume": {
                "uuid": "51276f5f-7c6d-11e9-97e8-0050568ea123",
                "name": "fg_oss_1558514455",
            },
            "qos_policy": {
                "name": "vs0_auto_gen_policy_39a9522f_ff35_11e9_b0f9_005056a7ab52",
                "uuid": "39ac471f-ff35-11e9-b0f9-005056a7ab52",
            },
            "name": "bucket-2",
            "encryption": {"enabled": False},
            "uuid": "527812ab-7c6d-11e9-97e8-0050568ea123",
            "comment": "S3 bucket.",
        }
    )

### Creating an S3 bucket for an SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="netapp1!", verify=False):
        resource = S3Bucket()
        resource.aggregates = [
            {"name": "aggr5", "uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123"}
        ]
        resource.comment = "S3 bucket."
        resource.constituents_per_aggregate = 4
        resource.name = "bucket-3"
        resource.svm.name = "vs1"
        resource.post(hydrate=True, return_timeout=0)
        print(resource)

Try it out

    S3Bucket({"name": "bucket-3", "comment": "S3 bucket."})

### Creating an S3 bucket along with QoS policy for an SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="netapp1!", verify=False):
        resource = S3Bucket()
        resource.comment = "S3 bucket."
        resource.name = "bucket-3"
        resource.svm.name = "vs1"
        resource.qos_policy.min_throughput_iops = 0
        resource.qos_policy.max_throughput_iops = 1000000
        resource.qos_policy.max_throughput_mbps = 900000
        resource.qos_policy.uuid = "02d07a93-6177-11ea-b241-000c293feac8"
        resource.qos_policy.name = (
            "vs0_auto_gen_policy_02cfa02a_6177_11ea_b241_000c293feac8"
        )
        resource.post(hydrate=True, return_timeout=0)
        print(resource)

Try it out

    S3Bucket({"name": "bucket-3", "comment": "S3 bucket."})

### Creating an S3 bucket along with policies and conditions for an SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="netapp1!", verify=False):
        resource = S3Bucket()
        resource.aggregates = [
            {"name": "aggr5", "uuid": "12f3ba4c-7ae0-11e9-8c06-0050568ea123"}
        ]
        resource.comment = "S3 bucket."
        resource.constituents_per_aggregate = 4
        resource.name = "bucket-3"
        resource.policy.statements = [
            {
                "actions": ["GetObject"],
                "conditions": [
                    {"operator": "ip_address", "source_ips": ["1.1.1.1/23", "1.2.2.2/20"]}
                ],
                "effect": "allow",
                "resources": ["bucket-3/policies/examples/*"],
                "sid": "AccessToGetObjectForAllUsersofSVM",
            },
            {
                "actions": ["*Object"],
                "effect": "deny",
                "principals": ["mike"],
                "resources": ["bucket-3/policy-docs/*", "bucket-3/confidential-*"],
                "sid": "DenyAccessToObjectForMike",
            },
            {
                "actions": ["GetObject"],
                "effect": "allow",
                "principals": ["*"],
                "resources": ["bucket-3/readme"],
                "sid": "AnonnymousAccessToGetObjectForUsers",
            },
        ]
        resource.svm.uuid = "259b4e46-2d33-11ea-9145-005056bbbec1"
        resource.post(hydrate=True, return_timeout=0)
        print(resource)

Try it out

    S3Bucket({"name": "bucket-3", "comment": "S3 bucket."})

### Updating an S3 bucket for an SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = S3Bucket(
            uuid="376a2efd-2d4d-11ea-9c30-005056bb883a",
            **{"svm.uuid": "259b4e46-2d33-11ea-9145-005056bbbec1"}
        )
        resource.comment = "Bucket modified."
        resource.size = 111111111111
        resource.qos_policy.min_throughput_iops = 0
        resource.qos_policy.max_throughput_iops = 1000000
        resource.qos_policy.max_throughput_mbps = 900000
        resource.qos_policy.uuid = "02d07a93-6177-11ea-b241-000c293feac8"
        resource.qos_policy.name = (
            "vs0_auto_gen_policy_02cfa02a_6177_11ea_b241_000c293feac8"
        )
        resource.patch()

### Updating an S3 bucket policy for an SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = S3Bucket(
            uuid="376a2efd-2d4d-11ea-9c30-005056bb883a",
            **{"svm.uuid": "259b4e46-2d33-11ea-9145-005056bbbec1"}
        )
        resource.policy.statements = [
            {
                "actions": ["*"],
                "conditions": [{"operator": "ip_address", "source_ips": ["1.1.1.5/23"]}],
                "effect": "allow",
                "resources": ["*"],
                "sid": "fullAccessForAllPrincipalsToBucket",
            }
        ]
        resource.patch()

### Deleting an S3 bucket for a specified SVM

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import S3Bucket

    with HostConnection("<mgmt-ip>", username="admin", password="netapp1!", verify=False):
        resource = S3Bucket(
            uuid="98528221-2d52-11ea-892e-005056bbbec1",
            **{"svm.uuid": "259b4e46-2d33-11ea-9145-005056bbbec1"}
        )
        resource.delete()

## Classes

`class S3Bucket (*args, **kwargs)`

  A bucket is a container of objects. Each bucket defines an object namespace. S3 requests specify objects using a bucket-name and object-name pair. An object resides within a bucket.

  Initialize the instance of the resource.

  Any keyword arguments are set on the instance as properties. For example, if the class was named 'MyResource', then this statement would be true:

      MyResource(name='foo').name == 'foo'

  ## Args

  `*args`
    Each positional argument represents a parent key as used in the URL of the object. That is, each value will be used to fill in a segment of the URL which refers to some parent object. The order of these arguments must match the order they are specified in the URL, from left to right.
  `**kwargs`
    each entry will have its key set as an attribute name on the instance and its value will be the value of that attribute.

  ### Ancestors

  - Resource

  ### Static methods

  `def count_collection(*args, connection: HostConnection = None, **kwargs) -> int`

    Retrieves all S3 buckets for all SVMs. Note that in order to retrieve S3 bucket policy conditions, the 'fields' option should be set to '**'.

    ### Related ONTAP commands

    - `vserver object-store-server bucket show`
    - `vserver object-store-server bucket policy statement show`
    - `vserver object-store-server bucket policy-statement-condition show`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Fetch a count of all objects of this type from the host.

    This calls GET on the object to determine the number of records. It is more efficient than calling get_collection() because it will not construct any objects. Query parameters can be passed in as kwargs to determine a count of objects that match some filtered criteria.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the count of bars for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. These query parameters can affect the count. A return_records query param will be ignored.

    ## Returns

    On success, returns an integer count of the objects of this type. On failure, returns -1.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400, or if there is no connection available to use either passed in or on the library.

  `def delete_collection(*args, body: typing.Union = None, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Deletes the S3 bucket configuration of an SVM. An access policy is also deleted on an S3 bucket "delete" command.

    ### Related ONTAP commands

    - `vserver object-store-server bucket delete`
    - `vserver object-store-server bucket policy statement delete`
    - `vserver object-store-server bucket policy-statement-condition delete`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Delete all objects in a collection which match the given query.

    All records on the host which match the query will be deleted.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to delete the collection of bars for a particular foo, the foo.name value should be passed.
    `body`
      The body of the delete request. This could be a Resource instance or a dictionary object.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. Only resources matching this query will be patched.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def find(*args, connection: HostConnection = None, **kwargs) -> Resource`

    Retrieves all S3 buckets for all SVMs. Note that in order to retrieve S3 bucket policy conditions, the 'fields' option should be set to '**'.

    ### Related ONTAP commands

    - `vserver object-store-server bucket show`
    - `vserver object-store-server bucket policy statement show`
    - `vserver object-store-server bucket policy-statement-condition show`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Find an instance of an object on the host given a query.

    The host will be queried with the provided key/value pairs to find a matching resource. If 0 are found, None will be returned. If more than 1 is found, an error will be raised or returned. If there is exactly 1 matching record, then it will be returned.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to find a bar for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A `Resource` object containing the details of the object or None if no matches were found.

    ## Raises

    `NetAppRestError`: If the API call returned more than 1 matching resource.

  `def get_collection(*args, connection: HostConnection = None, max_records: int = None, **kwargs) -> typing.Iterable`

    Retrieves all S3 buckets for all SVMs. Note that in order to retrieve S3 bucket policy conditions, the 'fields' option should be set to '**'.

    ### Related ONTAP commands

    - `vserver object-store-server bucket show`
    - `vserver object-store-server bucket policy statement show`
    - `vserver object-store-server bucket policy-statement-condition show`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Fetch a list of all objects of this type from the host.

    This is a lazy fetch, making API calls only as necessary when the result of this call is iterated over. For instance, if max_records is set to 5, then iterating over the collection causes an API call to be sent to the server once for every 5 records. If the client stops iterating before getting to the 6th record, then no additional API calls are made.

    ## Args

    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to get the collection of bars for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `max_records`
      The maximum number of records to return per call
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A list of `Resource` objects

    ## Raises

    `NetAppRestError`: If there is no connection available to use either passed in or on the library. This would be not be raised when get_collection() is called, but rather when the result is iterated.

  `def patch_collection(body: dict, *args, connection: HostConnection = None, **kwargs) -> NetAppResponse`

    Updates the S3 bucket configuration of an SVM.

    ### Important notes

    - The following fields can be modified for a bucket:
    - `comment` - Any information related to the bucket.
    - `size` - Bucket size.
    - `policy` - An access policy for resources (buckets and objects) that defines their permissions. New policies are created after existing policies are deleted. To retain any of the existing policy statements, you need to specify those statements again. Also, policy conditions can be specified as part of a bucket policy.
    - `qos_policy` - A QoS policy for buckets.

    ### Related ONTAP commands

    - `vserver object-store-server bucket modify`
    - `vserver object-store-server bucket policy statement modify`
    - `vserver object-store-server bucket policy-statement-condition modify`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Patch all objects in a collection which match the given query.

    All records on the host which match the query will be patched with the provided body.

    ## Args

    `body`
      A dictionary of name/value pairs to set on all matching members of the collection.
    `*args`
      Each entry represents a parent key which is used to build the path to the child object. If the URL definition were /api/foos/{foo.name}/bars, then to patch the collection of bars for a particular foo, the foo.name value should be passed.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host. Only resources matching this query will be patched.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Methods

  `def delete(self, body: typing.Union = None, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse`

    Deletes the S3 bucket configuration of an SVM. An access policy is also deleted on an S3 bucket "delete" command.

    ### Related ONTAP commands

    - `vserver object-store-server bucket delete`
    - `vserver object-store-server bucket policy statement delete`
    - `vserver object-store-server bucket policy-statement-condition delete`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Send a deletion request to the host for this object.

    ## Args

    `body`
      The body of the delete request. This could be a Resource instance or a dictionary object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `**kwargs`
      Any key/value pairs passed will be sent as query parameters to the host.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def get(self, **kwargs) -> NetAppResponse`

    Retrieves the S3 bucket configuration of an SVM. Note that in order to retrieve S3 bucket policy conditions, the 'fields' option should be set to '**'.

    ### Related ONTAP commands

    - `vserver object-store-server bucket show`
    - `vserver object-store-server bucket policy statement show`
    - `vserver object-store-server bucket policy-statement-condition show`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Fetch the details of the object from the host.

    Requires the keys to be set (if any). After returning, new or changed properties from the host will be set on the instance.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def patch(self, hydrate: bool = False, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse`

    Updates the S3 bucket configuration of an SVM.

    ### Important notes

    - The following fields can be modified for a bucket:
    - `comment` - Any information related to the bucket.
    - `size` - Bucket size.
    - `policy` - An access policy for resources (buckets and objects) that defines their permissions. New policies are created after existing policies are deleted. To retain any of the existing policy statements, you need to specify those statements again. Also, policy conditions can be specified as part of a bucket policy.
    - `qos_policy` - A QoS policy for buckets.

    ### Related ONTAP commands

    - `vserver object-store-server bucket modify`
    - `vserver object-store-server bucket policy statement modify`
    - `vserver object-store-server bucket policy-statement-condition modify`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Send the difference in the object's state to the host as a modification request.

    Calculates the difference in the object's state since the last time we interacted with the host and sends this in the request body.

    ## Args

    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `**kwargs`
      Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  `def post(self, hydrate: bool = False, poll: bool = True, poll_interval: typing.Union = None, poll_timeout: typing.Union = None, **kwargs) -> NetAppResponse`

    Creates the S3 bucket configuration of an SVM.

    ### Important notes

    - Each SVM can have one or more bucket configurations.
    - Aggregate lists should be specified explicitly. If not specified, then the bucket is auto-provisioned as a FlexGroup volume.
    - Constituents per aggregate specifies the number of components (or FlexVol volumes) per aggregate. Is specified only when an aggregate list is explicitly defined.
    - An access policy can be created along with a bucket create. If creating an access policy fails, bucket configurations are saved and the access policy can be created using the PATCH endpoint.
    - "qos_policy" can be specified if a bucket needs to be attached to a QoS group policy during creation time.

    ### Required properties

    - `svm.uuid or svm.name` - Existing SVM in which to create the bucket configuration.
    - `name` - Bucket name that is to be created.

    ### Recommended optional properties

    - `aggregates` - List of aggregates for the FlexGroup volume on which the bucket is hosted on.
    - `constituents_per_aggregate` - Number of constituents per aggregate.
    - `size` - Specifying the bucket size is recommended.
    - `policy` - Specifying a policy enables users to perform operations on buckets; specifying the resource permissions is recommended.
    - `qos_policy` - A QoS policy for buckets.

    ### Default property values

    - `size` - 800MB
    - `comment` - ""
    - `aggregates` - No default value.
    - `constituents_per_aggregate` - 4 , if an aggregates list is specified. Otherwise, no default value.
    - `policy.statements.actions` - GetObject, PutObject, DeleteObject, ListBucket, ListBucketMultipartUploads, ListMultipartUploadParts.
    - `policy.statements.principals` - all S3 users and groups in the SVM.
    - `policy.statements.resources` - all objects in the bucket.
    - `policy.statements.conditions` - list of bucket policy conditions.

    ### Related ONTAP commands

    - `vserver object-store-server bucket create`
    - `vserver object-store-server bucket policy statement create`

    ### Learn more

    - `DOC /protocols/s3/buckets`

    Send this object to the host as a creation request.

    ## Args

    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `**kwargs`
      Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Inherited members

  - `Resource`:
    - `from_dict`
    - `get_collection_url`
    - `get_connection`
    - `instance_location`
    - `path_keys`
    - `poll`
    - `set_connection`
    - `to_dict`
`class S3BucketSchema (*, only: typing.Union = None, exclude: typing.Union = (), many: bool = False, context: typing.Dict = None, load_only: typing.Union = (), dump_only: typing.Union = (), partial: typing.Union = False, unknown: str = None)`

  The fields of the S3Bucket object

  ### Ancestors

  - netapp_ontap.resource.ResourceSchema
  - marshmallow.schema.Schema
  - marshmallow.base.SchemaABC

  ### Class variables

  `aggregates POST`

    A list of aggregates for FlexGroup volume constituents where the bucket is hosted. If this option is not specified, the bucket is auto-provisioned as a FlexGroup volume.

  `comment GET POST PATCH`

    Can contain any additional information about the bucket being created or modified.

    Example: S3 bucket.

  `constituents_per_aggregate POST`

    Specifies the number of constituents or FlexVol volumes per aggregate. A FlexGroup volume consisting of all such constituents across all specified aggregates is created. This option is used along with the aggregates option and cannot be used independently.

    Example: 4

  `encryption GET POST PATCH`

    The encryption field of the s3_bucket.

  `logical_used_size GET`

    Specifies the bucket logical used size up to this point.

  `name GET POST`

    Specifies the name of the bucket. Bucket name is a string that can only contain the following combination of ASCII-range alphanumeric characters 0-9, a-z, ".", and "-".

    Example: bucket1

  `policy GET POST PATCH`

    The policy field of the s3_bucket.

  `qos_policy GET POST PATCH`

    The qos_policy field of the s3_bucket.

  `size GET POST PATCH`

    Specifies the bucket size in bytes; ranges from 80MB to 64TB.

    Example: 1677721600

  `storage_service_level POST`

    Specifies the storage service level of the FlexGroup volume on which the bucket should be created. Valid values are "value", "performance" or "extreme".

    Valid choices:

    - value
    - performance
    - extreme
  `svm GET POST`

    The svm field of the s3_bucket.

  `uuid GET`

    Specifies the unique identifier of the bucket.

    Example: 414b29a1-3b26-11e9-bd58-0050568ea055

  `volume GET POST PATCH`

    The volume field of the s3_bucket.