mediastore

package
v3.19.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	pulumi.CustomResourceState

	// The ARN of the container.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The DNS endpoint of the container.
	Endpoint pulumi.StringOutput `pulumi:"endpoint"`
	// The name of the container. Must contain alphanumeric characters or underscores.
	Name pulumi.StringOutput `pulumi:"name"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Provides a MediaStore Container.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/mediastore"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := mediastore.NewContainer(ctx, "example", nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

MediaStore Container can be imported using the MediaStore Container Name, e.g.

```sh

$ pulumi import aws:mediastore/container:Container example example

```

func GetContainer

func GetContainer(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ContainerState, opts ...pulumi.ResourceOption) (*Container, error)

GetContainer gets an existing Container resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewContainer

func NewContainer(ctx *pulumi.Context,
	name string, args *ContainerArgs, opts ...pulumi.ResourceOption) (*Container, error)

NewContainer registers a new resource with the given unique name, arguments, and options.

func (Container) ElementType added in v3.13.0

func (Container) ElementType() reflect.Type

func (Container) ToContainerOutput added in v3.13.0

func (i Container) ToContainerOutput() ContainerOutput

func (Container) ToContainerOutputWithContext added in v3.13.0

func (i Container) ToContainerOutputWithContext(ctx context.Context) ContainerOutput

type ContainerArgs

type ContainerArgs struct {
	// The name of the container. Must contain alphanumeric characters or underscores.
	Name pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Container resource.

func (ContainerArgs) ElementType

func (ContainerArgs) ElementType() reflect.Type

type ContainerInput added in v3.13.0

type ContainerInput interface {
	pulumi.Input

	ToContainerOutput() ContainerOutput
	ToContainerOutputWithContext(ctx context.Context) ContainerOutput
}

type ContainerOutput added in v3.13.0

type ContainerOutput struct {
	*pulumi.OutputState
}

func (ContainerOutput) ElementType added in v3.13.0

func (ContainerOutput) ElementType() reflect.Type

func (ContainerOutput) ToContainerOutput added in v3.13.0

func (o ContainerOutput) ToContainerOutput() ContainerOutput

func (ContainerOutput) ToContainerOutputWithContext added in v3.13.0

func (o ContainerOutput) ToContainerOutputWithContext(ctx context.Context) ContainerOutput

type ContainerPolicy

type ContainerPolicy struct {
	pulumi.CustomResourceState

	// The name of the container.
	ContainerName pulumi.StringOutput `pulumi:"containerName"`
	// The contents of the policy.
	Policy pulumi.StringOutput `pulumi:"policy"`
}

Provides a MediaStore Container Policy.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v3/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/mediastore"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		currentRegion, err := aws.GetRegion(ctx, nil, nil)
		if err != nil {
			return err
		}
		currentCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleContainer, err := mediastore.NewContainer(ctx, "exampleContainer", nil)
		if err != nil {
			return err
		}
		_, err = mediastore.NewContainerPolicy(ctx, "exampleContainerPolicy", &mediastore.ContainerPolicyArgs{
			ContainerName: exampleContainer.Name,
			Policy: exampleContainer.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "	\"Version\": \"2012-10-17\",\n", "	\"Statement\": [{\n", "		\"Sid\": \"MediaStoreFullAccess\",\n", "		\"Action\": [ \"mediastore:*\" ],\n", "		\"Principal\": {\"AWS\" : \"arn:aws:iam::", currentCallerIdentity.AccountId, ":root\"},\n", "		\"Effect\": \"Allow\",\n", "		\"Resource\": \"arn:aws:mediastore:", currentRegion.Name, ":", currentCallerIdentity.AccountId, ":container/", name, "/*\",\n", "		\"Condition\": {\n", "			\"Bool\": { \"aws:SecureTransport\": \"true\" }\n", "		}\n", "	}]\n", "}\n"), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

MediaStore Container Policy can be imported using the MediaStore Container Name, e.g.

```sh

$ pulumi import aws:mediastore/containerPolicy:ContainerPolicy example example

```

func GetContainerPolicy

func GetContainerPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ContainerPolicyState, opts ...pulumi.ResourceOption) (*ContainerPolicy, error)

GetContainerPolicy gets an existing ContainerPolicy resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewContainerPolicy

func NewContainerPolicy(ctx *pulumi.Context,
	name string, args *ContainerPolicyArgs, opts ...pulumi.ResourceOption) (*ContainerPolicy, error)

NewContainerPolicy registers a new resource with the given unique name, arguments, and options.

func (ContainerPolicy) ElementType added in v3.13.0

func (ContainerPolicy) ElementType() reflect.Type

func (ContainerPolicy) ToContainerPolicyOutput added in v3.13.0

func (i ContainerPolicy) ToContainerPolicyOutput() ContainerPolicyOutput

func (ContainerPolicy) ToContainerPolicyOutputWithContext added in v3.13.0

func (i ContainerPolicy) ToContainerPolicyOutputWithContext(ctx context.Context) ContainerPolicyOutput

type ContainerPolicyArgs

type ContainerPolicyArgs struct {
	// The name of the container.
	ContainerName pulumi.StringInput
	// The contents of the policy.
	Policy pulumi.StringInput
}

The set of arguments for constructing a ContainerPolicy resource.

func (ContainerPolicyArgs) ElementType

func (ContainerPolicyArgs) ElementType() reflect.Type

type ContainerPolicyInput added in v3.13.0

type ContainerPolicyInput interface {
	pulumi.Input

	ToContainerPolicyOutput() ContainerPolicyOutput
	ToContainerPolicyOutputWithContext(ctx context.Context) ContainerPolicyOutput
}

type ContainerPolicyOutput added in v3.13.0

type ContainerPolicyOutput struct {
	*pulumi.OutputState
}

func (ContainerPolicyOutput) ElementType added in v3.13.0

func (ContainerPolicyOutput) ElementType() reflect.Type

func (ContainerPolicyOutput) ToContainerPolicyOutput added in v3.13.0

func (o ContainerPolicyOutput) ToContainerPolicyOutput() ContainerPolicyOutput

func (ContainerPolicyOutput) ToContainerPolicyOutputWithContext added in v3.13.0

func (o ContainerPolicyOutput) ToContainerPolicyOutputWithContext(ctx context.Context) ContainerPolicyOutput

type ContainerPolicyState

type ContainerPolicyState struct {
	// The name of the container.
	ContainerName pulumi.StringPtrInput
	// The contents of the policy.
	Policy pulumi.StringPtrInput
}

func (ContainerPolicyState) ElementType

func (ContainerPolicyState) ElementType() reflect.Type

type ContainerState

type ContainerState struct {
	// The ARN of the container.
	Arn pulumi.StringPtrInput
	// The DNS endpoint of the container.
	Endpoint pulumi.StringPtrInput
	// The name of the container. Must contain alphanumeric characters or underscores.
	Name pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

func (ContainerState) ElementType

func (ContainerState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL