Source code for alibabacloud_oss_v2.models.bucket_public_access_block

import datetime
from typing import Optional, List, Any, Union
from .. import serde


[docs] class PublicAccessBlockConfiguration(serde.Model): """ The container in which the Block Public Access configurations are stored. """ _attribute_map = { 'block_public_access': {'tag': 'xml', 'rename': 'BlockPublicAccess', 'type': 'bool'}, } _xml_map = { 'name': 'PublicAccessBlockConfiguration' } def __init__( self, block_public_access: Optional[bool] = None, **kwargs: Any ) -> None: """ block_public_access (bool, optional): Specifies whether to enable Block Public Access.true: enables Block Public Access.false (default): disables Block Public Access. """ super().__init__(**kwargs) self.block_public_access = block_public_access
[docs] class GetBucketPublicAccessBlockRequest(serde.RequestModel): """ The request for the GetBucketPublicAccessBlock operation. """ _attribute_map = { 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str'}, } def __init__( self, bucket: Optional[str] = None, **kwargs: Any ) -> None: """ bucket (str, optional): """ super().__init__(**kwargs) self.bucket = bucket
[docs] class GetBucketPublicAccessBlockResult(serde.ResultModel): """ The request for the GetBucketPublicAccessBlock operation. """ _attribute_map = { 'public_access_block_configuration': {'tag': 'output', 'position': 'body', 'rename': 'PublicAccessBlockConfiguration', 'type': 'PublicAccessBlockConfiguration,xml'}, } _dependency_map = { 'PublicAccessBlockConfiguration': {'new': lambda: PublicAccessBlockConfiguration()}, } def __init__( self, public_access_block_configuration: Optional[PublicAccessBlockConfiguration] = None, **kwargs: Any ) -> None: """ public_access_block_configuration (PublicAccessBlockConfiguration, optional): The container in which the Block Public Access configurations are stored. """ super().__init__(**kwargs) self.public_access_block_configuration = public_access_block_configuration
[docs] class PutBucketPublicAccessBlockRequest(serde.RequestModel): """ The request for the PutBucketPublicAccessBlock operation. """ _attribute_map = { 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str'}, 'public_access_block_configuration': {'tag': 'input', 'position': 'body', 'rename': 'PublicAccessBlockConfiguration', 'type': 'xml'}, } def __init__( self, bucket: Optional[str] = None, public_access_block_configuration: Optional[PublicAccessBlockConfiguration] = None, **kwargs: Any ) -> None: """ bucket (str, optional): The name of the bucket. public_access_block_configuration (PublicAccessBlockConfiguration, optional): Request body. """ super().__init__(**kwargs) self.bucket = bucket self.public_access_block_configuration = public_access_block_configuration
[docs] class PutBucketPublicAccessBlockResult(serde.ResultModel): """ The request for the PutBucketPublicAccessBlock operation. """
[docs] class DeleteBucketPublicAccessBlockRequest(serde.RequestModel): """ The request for the DeleteBucketPublicAccessBlock operation. """ _attribute_map = { 'bucket': {'tag': 'input', 'position': 'host', 'rename': 'bucket', 'type': 'str'}, } def __init__( self, bucket: Optional[str] = None, **kwargs: Any ) -> None: """ bucket (str, optional): The name of the bucket. """ super().__init__(**kwargs) self.bucket = bucket
[docs] class DeleteBucketPublicAccessBlockResult(serde.ResultModel): """ The request for the DeleteBucketPublicAccessBlock operation. """