1. Packages
  2. Alicloud Provider
  3. API Docs
  4. oss
  5. BucketVersioning
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.oss.BucketVersioning

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Import

    OSS Bucket Versioning can be imported using the id, e.g.

    $ pulumi import alicloud:oss/bucketVersioning:BucketVersioning example <id>
    

    Create BucketVersioning Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BucketVersioning(name: string, args: BucketVersioningArgs, opts?: CustomResourceOptions);
    @overload
    def BucketVersioning(resource_name: str,
                         args: BucketVersioningInitArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def BucketVersioning(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         bucket: Optional[str] = None,
                         status: Optional[str] = None)
    func NewBucketVersioning(ctx *Context, name string, args BucketVersioningArgs, opts ...ResourceOption) (*BucketVersioning, error)
    public BucketVersioning(string name, BucketVersioningArgs args, CustomResourceOptions? opts = null)
    public BucketVersioning(String name, BucketVersioningArgs args)
    public BucketVersioning(String name, BucketVersioningArgs args, CustomResourceOptions options)
    
    type: alicloud:oss:BucketVersioning
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BucketVersioningArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BucketVersioningInitArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BucketVersioningArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BucketVersioningArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BucketVersioningArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var bucketVersioningResource = new AliCloud.Oss.BucketVersioning("bucketVersioningResource", new()
    {
        Bucket = "string",
        Status = "string",
    });
    
    example, err := oss.NewBucketVersioning(ctx, "bucketVersioningResource", &oss.BucketVersioningArgs{
    	Bucket: pulumi.String("string"),
    	Status: pulumi.String("string"),
    })
    
    var bucketVersioningResource = new BucketVersioning("bucketVersioningResource", BucketVersioningArgs.builder()
        .bucket("string")
        .status("string")
        .build());
    
    bucket_versioning_resource = alicloud.oss.BucketVersioning("bucketVersioningResource",
        bucket="string",
        status="string")
    
    const bucketVersioningResource = new alicloud.oss.BucketVersioning("bucketVersioningResource", {
        bucket: "string",
        status: "string",
    });
    
    type: alicloud:oss:BucketVersioning
    properties:
        bucket: string
        status: string
    

    BucketVersioning Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The BucketVersioning resource accepts the following input properties:

    Bucket string
    The name of the bucket.
    Status string
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    Bucket string
    The name of the bucket.
    Status string
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket String
    The name of the bucket.
    status String
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket string
    The name of the bucket.
    status string
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket str
    The name of the bucket.
    status str
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket String
    The name of the bucket.
    status String
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BucketVersioning resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BucketVersioning Resource

    Get an existing BucketVersioning resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BucketVersioningState, opts?: CustomResourceOptions): BucketVersioning
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket: Optional[str] = None,
            status: Optional[str] = None) -> BucketVersioning
    func GetBucketVersioning(ctx *Context, name string, id IDInput, state *BucketVersioningState, opts ...ResourceOption) (*BucketVersioning, error)
    public static BucketVersioning Get(string name, Input<string> id, BucketVersioningState? state, CustomResourceOptions? opts = null)
    public static BucketVersioning get(String name, Output<String> id, BucketVersioningState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Bucket string
    The name of the bucket.
    Status string
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    Bucket string
    The name of the bucket.
    Status string
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket String
    The name of the bucket.
    status String
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket string
    The name of the bucket.
    status string
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket str
    The name of the bucket.
    status str
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .
    bucket String
    The name of the bucket.
    status String
    A bucket can be in one of the following versioning states: disabled, enabled, or suspended. By default, versioning is disabled for a bucket. Updating the value from Enabled or Suspended to Disabled will result in errors, because OSS does not support returning buckets to an unversioned state. .

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi