Show / Hide Table of Contents

Class RecorderStatus

Manages status (recording / stopped) of an AWS Config Configuration Recorder.

Note: Starting Configuration Recorder requires a Delivery Channel to be present. Use of depends_on (as shown below) is recommended to avoid race conditions.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var fooRecorderStatus = new Aws.Cfg.RecorderStatus("fooRecorderStatus", new Aws.Cfg.RecorderStatusArgs
    {
        IsEnabled = true,
    });
    var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
  ""Action"": ""sts:AssumeRole"",
  ""Principal"": {
    ""Service"": ""config.amazonaws.com""
  },
  ""Effect"": ""Allow"",
  ""Sid"": """"
}
]
}

",
    });
    var rolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("rolePolicyAttachment", new Aws.Iam.RolePolicyAttachmentArgs
    {
        PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSConfigRole",
        Role = role.Name,
    });
    var bucket = new Aws.S3.Bucket("bucket", new Aws.S3.BucketArgs
    {
    });
    var fooDeliveryChannel = new Aws.Cfg.DeliveryChannel("fooDeliveryChannel", new Aws.Cfg.DeliveryChannelArgs
    {
        S3BucketName = bucket.BucketName,
    });
    var fooRecorder = new Aws.Cfg.Recorder("fooRecorder", new Aws.Cfg.RecorderArgs
    {
        RoleArn = role.Arn,
    });
    var rolePolicy = new Aws.Iam.RolePolicy("rolePolicy", new Aws.Iam.RolePolicyArgs
    {
        Policy = Output.Tuple(bucket.Arn, bucket.Arn).Apply(values =>
        {
            var bucketArn = values.Item1;
            var bucketArn1 = values.Item2;
            return @$"{{
""Version"": ""2012-10-17"",
""Statement"": [
{{
  ""Action"": [
    ""s3:*""
  ],
  ""Effect"": ""Allow"",
  ""Resource"": [
    ""{bucketArn}"",
    ""{bucketArn1}/*""
  ]
}}
]
}}

";
        }),
        Role = role.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RecorderStatus
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.Cfg
Assembly: Pulumi.Aws.dll
Syntax
public class RecorderStatus : CustomResource

Constructors

View Source

RecorderStatus(String, RecorderStatusArgs, CustomResourceOptions)

Create a RecorderStatus resource with the given unique name, arguments, and options.

Declaration
public RecorderStatus(string name, RecorderStatusArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RecorderStatusArgs 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

IsEnabled

Whether the configuration recorder should be enabled or disabled.

Declaration
public Output<bool> IsEnabled { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Name

The name of the recorder

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

Methods

View Source

Get(String, Input<String>, RecorderStatusState, CustomResourceOptions)

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

Declaration
public static RecorderStatus Get(string name, Input<string> id, RecorderStatusState 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.

RecorderStatusState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RecorderStatus
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.