Class BucketMetric
Provides a S3 bucket metrics configuration resource.
Example Usage
Add metrics configuration for entire S3 bucket
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.S3.Bucket("example", new Aws.S3.BucketArgs
{
});
var example_entire_bucket = new Aws.S3.BucketMetric("example-entire-bucket", new Aws.S3.BucketMetricArgs
{
Bucket = example.BucketName,
});
}
}
Add metrics configuration with S3 bucket object filter
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.S3.Bucket("example", new Aws.S3.BucketArgs
{
});
var example_filtered = new Aws.S3.BucketMetric("example-filtered", new Aws.S3.BucketMetricArgs
{
Bucket = example.BucketName,
Filter = new Aws.S3.Inputs.BucketMetricFilterArgs
{
Prefix = "documents/",
Tags =
{
{ "class", "blue" },
{ "priority", "high" },
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.S3
Assembly: Pulumi.Aws.dll
Syntax
public class BucketMetric : CustomResource
Constructors
View SourceBucketMetric(String, BucketMetricArgs, CustomResourceOptions)
Create a BucketMetric resource with the given unique name, arguments, and options.
Declaration
public BucketMetric(string name, BucketMetricArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| BucketMetricArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBucket
The name of the bucket to put metric configuration.
Declaration
public Output<string> Bucket { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Filter
Object filtering that accepts a prefix, tags, or a logical AND of prefix and tags (documented below).
Declaration
public Output<BucketMetricFilter> Filter { get; }
Property Value
| Type | Description |
|---|---|
| Output<BucketMetricFilter> |
Name
Unique identifier of the metrics configuration for the bucket.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, BucketMetricState, CustomResourceOptions)
Get an existing BucketMetric resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static BucketMetric Get(string name, Input<string> id, BucketMetricState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| BucketMetricState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| BucketMetric |