Skip to content

Bucket

This class encapsulates and extends the ROS resource type ALIYUN::OSS::Bucket, which is used to create an Object Storage Service (OSS) bucket.

Initializers

import ros_cdk_oss
ros_cdk_oss.Bucket(
  scope: Construct,
  id: str,
  bucket_name: typing.Union[str, IResolvable],
  access_control: typing.Union[str, IResolvable] = None,
  cors_configuration: typing.Union[IResolvable, CORSConfigurationProperty] = None,
  deletion_force: typing.Union[bool, IResolvable] = None,
  enable_oss_hdfs_service: typing.Union[bool, IResolvable] = None,
  lifecycle_configuration: typing.Union[IResolvable, LifecycleConfigurationProperty] = None,
  logging_configuration: typing.Union[IResolvable, LoggingConfigurationProperty] = None,
  policy: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None,
  redundancy_type: typing.Union[str, IResolvable] = None,
  referer_configuration: typing.Union[IResolvable, RefererConfigurationProperty] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  server_side_encryption_configuration: typing.Union[IResolvable, ServerSideEncryptionConfigurationProperty] = None,
  storage_class: typing.Union[str, IResolvable] = None,
  tags: typing.Mapping[typing.Any] = None,
  versioning_configuration: typing.Union[IResolvable, VersioningConfigurationProperty] = None,
  website_configuration_v2: typing.Union[IResolvable, WebsiteConfigurationV2Property] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
bucket_name typing.Union[str, ros_cdk_core.IResolvable] Property bucketName: bucket name.
access_control typing.Union[str, ros_cdk_core.IResolvable] Property accessControl: The access control list.
cors_configuration typing.Union[ros_cdk_core.IResolvable, CORSConfigurationProperty] Property corsConfiguration: Rules that define cross-origin resource sharing of objects in this bucket.
deletion_force typing.Union[bool, ros_cdk_core.IResolvable] Property deletionForce: Whether force delete the relative objects in the bucket.
enable_oss_hdfs_service typing.Union[bool, ros_cdk_core.IResolvable] Property enableOssHdfsService: Whether enable OSS-HDFS service.
lifecycle_configuration typing.Union[ros_cdk_core.IResolvable, LifecycleConfigurationProperty] Property lifecycleConfiguration: Rules that define how oss bucket manages objects during their lifetime.
logging_configuration typing.Union[ros_cdk_core.IResolvable, LoggingConfigurationProperty] Property loggingConfiguration: Settings that defines where logs are stored.
policy typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] Property policy: Bucket policy.
redundancy_type typing.Union[str, ros_cdk_core.IResolvable] Property redundancyType: Specifies the data disaster recovery type of the storage space.
referer_configuration typing.Union[ros_cdk_core.IResolvable, RefererConfigurationProperty] Property refererConfiguration: undefined.
resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupId: The resource group id.
server_side_encryption_configuration typing.Union[ros_cdk_core.IResolvable, ServerSideEncryptionConfigurationProperty] Property serverSideEncryptionConfiguration: Specifies the bucket used to store the server-side encryption rule.
storage_class typing.Union[str, ros_cdk_core.IResolvable] Property storageClass: Specifies the storage class of the bucket.
tags typing.Mapping[typing.Any] Property tags: Bucket tags in k-v pairs format.
versioning_configuration typing.Union[ros_cdk_core.IResolvable, VersioningConfigurationProperty] Property versioningConfiguration: A state of versioning.
website_configuration_v2 typing.Union[ros_cdk_core.IResolvable, WebsiteConfigurationV2Property] Property websiteConfigurationV2: Website configuration.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

bucket_nameRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property bucketName: bucket name.


access_controlOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property accessControl: The access control list.


cors_configurationOptional

Property corsConfiguration: Rules that define cross-origin resource sharing of objects in this bucket.


deletion_forceOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property deletionForce: Whether force delete the relative objects in the bucket.

Default value is false.


enable_oss_hdfs_serviceOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property enableOssHdfsService: Whether enable OSS-HDFS service.

Note: Once it's enabled, it can't be disabled again.


lifecycle_configurationOptional

Property lifecycleConfiguration: Rules that define how oss bucket manages objects during their lifetime.


logging_configurationOptional

Property loggingConfiguration: Settings that defines where logs are stored.


policyOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]

Property policy: Bucket policy.


redundancy_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property redundancyType: Specifies the data disaster recovery type of the storage space.

The value range is as follows: LRS (default): Local redundant LRS stores your data redundantly on different storage devices in the same availability zone, and can support data loss and normal access even when two storage devices are damaged concurrently. ZRS: Intra-city redundant ZRS adopts a data redundancy storage mechanism in multiple availability zones (AZ), and stores user data redundantly in multiple availability zones in the same region. When an availability zone is unavailable, normal access to data can still be guaranteed.


referer_configurationOptional

Property refererConfiguration: undefined.


resource_group_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupId: The resource group id.


server_side_encryption_configurationOptional

Property serverSideEncryptionConfiguration: Specifies the bucket used to store the server-side encryption rule.


storage_classOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property storageClass: Specifies the storage class of the bucket.

Default is "Standard".


tagsOptional

  • Type: typing.Mapping[typing.Any]

Property tags: Bucket tags in k-v pairs format.


versioning_configurationOptional

Property versioningConfiguration: A state of versioning.


website_configuration_v2Optional

Property websiteConfigurationV2: Website configuration.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.
validate_bucket_name Thrown an exception if the given bucket name is not valid.

is_construct

import ros_cdk_oss
ros_cdk_oss.Bucket.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

validate_bucket_name

import ros_cdk_oss
ros_cdk_oss.Bucket.validate_bucket_name(
  physical_name: str
)

Thrown an exception if the given bucket name is not valid.

physical_nameRequired

  • Type: str

name of the bucket.


Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_domain_name ros_cdk_core.IResolvable Attribute DomainName: The public DNS name of the specified bucket.
attr_internal_domain_name ros_cdk_core.IResolvable Attribute InternalDomainName: The internal DNS name of the specified bucket.
attr_name ros_cdk_core.IResolvable Attribute Name: The name of Bucket.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_domain_nameRequired

attr_domain_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DomainName: The public DNS name of the specified bucket.


attr_internal_domain_nameRequired

attr_internal_domain_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute InternalDomainName: The internal DNS name of the specified bucket.


attr_nameRequired

attr_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Name: The name of Bucket.