Show / Hide Table of Contents

Class ContainerPolicy

Provides a MediaStore Container Policy.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var currentRegion = Output.Create(Aws.GetRegion.InvokeAsync());
    var currentCallerIdentity = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
    var exampleContainer = new Aws.MediaStore.Container("exampleContainer", new Aws.MediaStore.ContainerArgs
    {
    });
    var exampleContainerPolicy = new Aws.MediaStore.ContainerPolicy("exampleContainerPolicy", new Aws.MediaStore.ContainerPolicyArgs
    {
        ContainerName = exampleContainer.Name,
        Policy = Output.Tuple(currentCallerIdentity, currentCallerIdentity, currentRegion, exampleContainer.Name).Apply(values =>
        {
            var currentCallerIdentity = values.Item1;
            var currentCallerIdentity1 = values.Item2;
            var currentRegion = values.Item3;
            var name = values.Item4;
            return @$"{{
""Version"": ""2012-10-17"",
""Statement"": [{{
""Sid"": ""MediaStoreFullAccess"",
""Action"": [ ""mediastore:*"" ],
""Principal"": {{""AWS"" : ""arn:aws:iam::{currentCallerIdentity.AccountId}:root""}},
""Effect"": ""Allow"",
""Resource"": ""arn:aws:mediastore:{currentCallerIdentity1.AccountId}:{currentRegion.Name}:container/{name}/*"",
""Condition"": {{
""Bool"": {{ ""aws:SecureTransport"": ""true"" }}
}}
}}]
}}

";
        }),
    });
}

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

Constructors

View Source

ContainerPolicy(String, ContainerPolicyArgs, CustomResourceOptions)

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

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

The unique name of the resource

ContainerPolicyArgs 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

ContainerName

The name of the container.

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

Policy

The contents of the policy.

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

Methods

View Source

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

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

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

ContainerPolicyState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

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