Show / Hide Table of Contents

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" },
            },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
BucketMetric
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.S3
Assembly: Pulumi.Aws.dll
Syntax
public class BucketMetric : CustomResource

Constructors

View Source

BucketMetric(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 Source

Bucket

The name of the bucket to put metric configuration.

Declaration
public Output<string> Bucket { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.