GetBuckets
This data source provides the OSS buckets of the current Alibaba Cloud user.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var ossBucketsDs = Output.Create(AliCloud.Oss.GetBuckets.InvokeAsync(new AliCloud.Oss.GetBucketsArgs
{
NameRegex = "sample_oss_bucket",
}));
this.FirstOssBucketName = ossBucketsDs.Apply(ossBucketsDs => ossBucketsDs.Buckets[0].Name);
}
[Output("firstOssBucketName")]
public Output<string> FirstOssBucketName { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
oss_buckets_ds = alicloud.oss.get_buckets(name_regex="sample_oss_bucket")
pulumi.export("firstOssBucketName", oss_buckets_ds.buckets[0]["name"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ossBucketsDs = pulumi.output(alicloud.oss.getBuckets({
nameRegex: "sample_oss_bucket",
}, { async: true }));
export const firstOssBucketName = ossBucketsDs.buckets[0].name;Using GetBuckets
function getBuckets(args: GetBucketsArgs, opts?: InvokeOptions): Promise<GetBucketsResult>function get_buckets(name_regex=None, output_file=None, opts=None)func GetBuckets(ctx *Context, args *GetBucketsArgs, opts ...InvokeOption) (*GetBucketsResult, error)public static class GetBuckets {
public static Task<GetBucketsResult> InvokeAsync(GetBucketsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name
Regex string A regex string to filter results by bucket name.
- Output
File string
- Name
Regex string A regex string to filter results by bucket name.
- Output
File string
- name
Regex string A regex string to filter results by bucket name.
- output
File string
- name_
regex str A regex string to filter results by bucket name.
- output_
file str
GetBuckets Result
The following output properties are available:
- Buckets
List<Pulumi.
Ali Cloud. Oss. Outputs. Get Buckets Bucket> A list of buckets. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Names List<string>
A list of bucket names.
- Name
Regex string - Output
File string
- Buckets
[]Get
Buckets Bucket A list of buckets. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Names []string
A list of bucket names.
- Name
Regex string - Output
File string
- buckets
Get
Buckets Bucket[] A list of buckets. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- names string[]
A list of bucket names.
- name
Regex string - output
File string
- buckets
List[Get
Buckets Bucket] A list of buckets. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- names List[str]
A list of bucket names.
- name_
regex str - output_
file str
Supporting Types
GetBucketsBucket
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Acl string
Bucket access control list. Possible values:
private,public-readandpublic-read-write.- Cors
Rules List<Pulumi.Ali Cloud. Oss. Inputs. Get Buckets Bucket Cors Rule Args> A list of CORS rule configurations. Each element contains the following attributes:
- Creation
Date string Bucket creation date.
- Extranet
Endpoint string Internet domain name for accessing the bucket from outside.
- Intranet
Endpoint string Intranet domain name for accessing the bucket from an ECS instance in the same region.
- Lifecycle
Rules List<Pulumi.Ali Cloud. Oss. Inputs. Get Buckets Bucket Lifecycle Rule Args> A list CORS of lifecycle configurations. When Lifecycle is enabled, OSS automatically deletes the objects or transitions the objects (to another storage class) corresponding the lifecycle rules on a regular basis. Each element contains the following attributes:
- Location string
Region of the data center where the bucket is located.
- Logging
Pulumi.
Ali Cloud. Oss. Inputs. Get Buckets Bucket Logging Args A list of one element containing configuration parameters used for storing access log information. It contains the following attributes:
- Name string
Bucket name.
- Owner string
Bucket owner.
- Referer
Config Pulumi.Ali Cloud. Oss. Inputs. Get Buckets Bucket Referer Config Args A list of one element containing referer configuration. It contains the following attributes:
- Server
Side Pulumi.Encryption Rule Ali Cloud. Oss. Inputs. Get Buckets Bucket Server Side Encryption Rule Args A configuration of default encryption for a bucket. It contains the following attributes:
- Storage
Class string Object storage type. Possible values:
Standard,IAandArchive.- Dictionary<string, object>
A mapping of tags.
- Versioning
Pulumi.
Ali Cloud. Oss. Inputs. Get Buckets Bucket Versioning Args If present , the versioning state has been set on the bucket. It contains the following attribute.
- Website
Pulumi.
Ali Cloud. Oss. Inputs. Get Buckets Bucket Website Args A list of one element containing configuration parameters used when the bucket is used as a website. It contains the following attributes:
- Policy string
- Acl string
Bucket access control list. Possible values:
private,public-readandpublic-read-write.- Cors
Rules []GetBuckets Bucket Cors Rule A list of CORS rule configurations. Each element contains the following attributes:
- Creation
Date string Bucket creation date.
- Extranet
Endpoint string Internet domain name for accessing the bucket from outside.
- Intranet
Endpoint string Intranet domain name for accessing the bucket from an ECS instance in the same region.
- Lifecycle
Rules []GetBuckets Bucket Lifecycle Rule A list CORS of lifecycle configurations. When Lifecycle is enabled, OSS automatically deletes the objects or transitions the objects (to another storage class) corresponding the lifecycle rules on a regular basis. Each element contains the following attributes:
- Location string
Region of the data center where the bucket is located.
- Logging
Get
Buckets Bucket Logging A list of one element containing configuration parameters used for storing access log information. It contains the following attributes:
- Name string
Bucket name.
- Owner string
Bucket owner.
- Referer
Config GetBuckets Bucket Referer Config A list of one element containing referer configuration. It contains the following attributes:
- Server
Side GetEncryption Rule Buckets Bucket Server Side Encryption Rule A configuration of default encryption for a bucket. It contains the following attributes:
- Storage
Class string Object storage type. Possible values:
Standard,IAandArchive.- map[string]interface{}
A mapping of tags.
- Versioning
Get
Buckets Bucket Versioning If present , the versioning state has been set on the bucket. It contains the following attribute.
- Website
Get
Buckets Bucket Website A list of one element containing configuration parameters used when the bucket is used as a website. It contains the following attributes:
- Policy string
- acl string
Bucket access control list. Possible values:
private,public-readandpublic-read-write.- cors
Rules GetBuckets Bucket Cors Rule[] A list of CORS rule configurations. Each element contains the following attributes:
- creation
Date string Bucket creation date.
- extranet
Endpoint string Internet domain name for accessing the bucket from outside.
- intranet
Endpoint string Intranet domain name for accessing the bucket from an ECS instance in the same region.
- lifecycle
Rules GetBuckets Bucket Lifecycle Rule[] A list CORS of lifecycle configurations. When Lifecycle is enabled, OSS automatically deletes the objects or transitions the objects (to another storage class) corresponding the lifecycle rules on a regular basis. Each element contains the following attributes:
- location string
Region of the data center where the bucket is located.
- logging
Get
Buckets Bucket Logging A list of one element containing configuration parameters used for storing access log information. It contains the following attributes:
- name string
Bucket name.
- owner string
Bucket owner.
- referer
Config GetBuckets Bucket Referer Config A list of one element containing referer configuration. It contains the following attributes:
- server
Side GetEncryption Rule Buckets Bucket Server Side Encryption Rule A configuration of default encryption for a bucket. It contains the following attributes:
- storage
Class string Object storage type. Possible values:
Standard,IAandArchive.- {[key: string]: any}
A mapping of tags.
- versioning
Get
Buckets Bucket Versioning If present , the versioning state has been set on the bucket. It contains the following attribute.
- website
Get
Buckets Bucket Website A list of one element containing configuration parameters used when the bucket is used as a website. It contains the following attributes:
- policy string
- acl str
Bucket access control list. Possible values:
private,public-readandpublic-read-write.- cors_
rules List[GetBuckets Bucket Cors Rule] A list of CORS rule configurations. Each element contains the following attributes:
- creation_
date str Bucket creation date.
- extranet_
endpoint str Internet domain name for accessing the bucket from outside.
- intranet_
endpoint str Intranet domain name for accessing the bucket from an ECS instance in the same region.
- lifecycle_
rules List[GetBuckets Bucket Lifecycle Rule] A list CORS of lifecycle configurations. When Lifecycle is enabled, OSS automatically deletes the objects or transitions the objects (to another storage class) corresponding the lifecycle rules on a regular basis. Each element contains the following attributes:
- location str
Region of the data center where the bucket is located.
- logging
Dict[Get
Buckets Bucket Logging] A list of one element containing configuration parameters used for storing access log information. It contains the following attributes:
- name str
Bucket name.
- owner str
Bucket owner.
- referer_
config Dict[GetBuckets Bucket Referer Config] A list of one element containing referer configuration. It contains the following attributes:
- server_
side_ Dict[Getencryption_ rule Buckets Bucket Server Side Encryption Rule] A configuration of default encryption for a bucket. It contains the following attributes:
- storage_
class str Object storage type. Possible values:
Standard,IAandArchive.- Dict[str, Any]
A mapping of tags.
- versioning
Dict[Get
Buckets Bucket Versioning] If present , the versioning state has been set on the bucket. It contains the following attribute.
- website
Dict[Get
Buckets Bucket Website] A list of one element containing configuration parameters used when the bucket is used as a website. It contains the following attributes:
- policy str
GetBucketsBucketCorsRule
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Allowed
Headers List<string> Control whether the headers specified by Access-Control-Request-Headers in the OPTIONS prefetch command are allowed. Each header specified by Access-Control-Request-Headers must match a value in AllowedHeader. Each rule allows up to one wildcard “*” .
- Allowed
Methods List<string> Specify the allowed methods for cross-domain requests. Possible values:
GET,PUT,DELETE,POSTandHEAD.- Allowed
Origins List<string> The origins allowed for cross-domain requests. Multiple elements can be used to specify multiple allowed origins. Each rule allows up to one wildcard “*”. If “*” is specified, cross-domain requests of all origins are allowed.
- Expose
Headers List<string> Specify the response headers allowing users to access from an application (for example, a Javascript XMLHttpRequest object). The wildcard “*” is not allowed.
- Max
Age intSeconds Specify the cache time for the returned result of a browser prefetch (OPTIONS) request to a specific resource.
- Allowed
Headers []string Control whether the headers specified by Access-Control-Request-Headers in the OPTIONS prefetch command are allowed. Each header specified by Access-Control-Request-Headers must match a value in AllowedHeader. Each rule allows up to one wildcard “*” .
- Allowed
Methods []string Specify the allowed methods for cross-domain requests. Possible values:
GET,PUT,DELETE,POSTandHEAD.- Allowed
Origins []string The origins allowed for cross-domain requests. Multiple elements can be used to specify multiple allowed origins. Each rule allows up to one wildcard “*”. If “*” is specified, cross-domain requests of all origins are allowed.
- Expose
Headers []string Specify the response headers allowing users to access from an application (for example, a Javascript XMLHttpRequest object). The wildcard “*” is not allowed.
- Max
Age intSeconds Specify the cache time for the returned result of a browser prefetch (OPTIONS) request to a specific resource.
- allowed
Headers string[] Control whether the headers specified by Access-Control-Request-Headers in the OPTIONS prefetch command are allowed. Each header specified by Access-Control-Request-Headers must match a value in AllowedHeader. Each rule allows up to one wildcard “*” .
- allowed
Methods string[] Specify the allowed methods for cross-domain requests. Possible values:
GET,PUT,DELETE,POSTandHEAD.- allowed
Origins string[] The origins allowed for cross-domain requests. Multiple elements can be used to specify multiple allowed origins. Each rule allows up to one wildcard “*”. If “*” is specified, cross-domain requests of all origins are allowed.
- expose
Headers string[] Specify the response headers allowing users to access from an application (for example, a Javascript XMLHttpRequest object). The wildcard “*” is not allowed.
- max
Age numberSeconds Specify the cache time for the returned result of a browser prefetch (OPTIONS) request to a specific resource.
- allowed
Headers List[str] Control whether the headers specified by Access-Control-Request-Headers in the OPTIONS prefetch command are allowed. Each header specified by Access-Control-Request-Headers must match a value in AllowedHeader. Each rule allows up to one wildcard “*” .
- allowed
Methods List[str] Specify the allowed methods for cross-domain requests. Possible values:
GET,PUT,DELETE,POSTandHEAD.- allowed
Origins List[str] The origins allowed for cross-domain requests. Multiple elements can be used to specify multiple allowed origins. Each rule allows up to one wildcard “*”. If “*” is specified, cross-domain requests of all origins are allowed.
- expose
Headers List[str] Specify the response headers allowing users to access from an application (for example, a Javascript XMLHttpRequest object). The wildcard “*” is not allowed.
- max
Age floatSeconds Specify the cache time for the returned result of a browser prefetch (OPTIONS) request to a specific resource.
GetBucketsBucketLifecycleRule
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Enabled bool
Indicate whether the rule is enabled or not.
- Expiration
Pulumi.
Ali Cloud. Oss. Inputs. Get Buckets Bucket Lifecycle Rule Expiration Args A list of one element containing expiration attributes of an object. It contains the following attributes:
- Id string
Unique ID of the rule.
- Prefix string
Prefix applicable to a rule. Only those objects with a matching prefix can be affected by the rule.
- Enabled bool
Indicate whether the rule is enabled or not.
- Expiration
Get
Buckets Bucket Lifecycle Rule Expiration A list of one element containing expiration attributes of an object. It contains the following attributes:
- Id string
Unique ID of the rule.
- Prefix string
Prefix applicable to a rule. Only those objects with a matching prefix can be affected by the rule.
- enabled boolean
Indicate whether the rule is enabled or not.
- expiration
Get
Buckets Bucket Lifecycle Rule Expiration A list of one element containing expiration attributes of an object. It contains the following attributes:
- id string
Unique ID of the rule.
- prefix string
Prefix applicable to a rule. Only those objects with a matching prefix can be affected by the rule.
- enabled bool
Indicate whether the rule is enabled or not.
- expiration
Dict[Get
Buckets Bucket Lifecycle Rule Expiration] A list of one element containing expiration attributes of an object. It contains the following attributes:
- id str
Unique ID of the rule.
- prefix str
Prefix applicable to a rule. Only those objects with a matching prefix can be affected by the rule.
GetBucketsBucketLifecycleRuleExpiration
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetBucketsBucketLogging
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Target
Bucket string Bucket for storing access logs.
- Target
Prefix string Prefix of the saved access log file paths.
- Target
Bucket string Bucket for storing access logs.
- Target
Prefix string Prefix of the saved access log file paths.
- target
Bucket string Bucket for storing access logs.
- target
Prefix string Prefix of the saved access log file paths.
- target
Bucket str Bucket for storing access logs.
- target
Prefix str Prefix of the saved access log file paths.
GetBucketsBucketRefererConfig
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Allow
Empty bool Indicate whether the access request referer field can be empty.
- Referers List<string>
Referer access whitelist.
- Allow
Empty bool Indicate whether the access request referer field can be empty.
- Referers []string
Referer access whitelist.
- allow
Empty boolean Indicate whether the access request referer field can be empty.
- referers string[]
Referer access whitelist.
- allow
Empty bool Indicate whether the access request referer field can be empty.
- referers List[str]
Referer access whitelist.
GetBucketsBucketServerSideEncryptionRule
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Sse
Algorithm string The server-side encryption algorithm to use.
- Sse
Algorithm string The server-side encryption algorithm to use.
- sse
Algorithm string The server-side encryption algorithm to use.
- sse
Algorithm str The server-side encryption algorithm to use.
GetBucketsBucketVersioning
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetBucketsBucketWebsite
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Error
Document string Key of the HTML document containing the error page.
- Index
Document string Key of the HTML document containing the home page.
- Error
Document string Key of the HTML document containing the error page.
- Index
Document string Key of the HTML document containing the home page.
- error
Document string Key of the HTML document containing the error page.
- index
Document string Key of the HTML document containing the home page.
- error
Document str Key of the HTML document containing the error page.
- index
Document str Key of the HTML document containing the home page.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.