ecr

package
v4.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetAuthorizationTokenArgs

type GetAuthorizationTokenArgs struct {
	// AWS account ID of the ECR Repository. If not specified the default account is assumed.
	RegistryId *string `pulumi:"registryId"`
}

A collection of arguments for invoking getAuthorizationToken.

type GetAuthorizationTokenResult

type GetAuthorizationTokenResult struct {
	// Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of `user_name:password`.
	AuthorizationToken string `pulumi:"authorizationToken"`
	// The time in UTC RFC3339 format when the authorization token expires.
	ExpiresAt string `pulumi:"expiresAt"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// Password decoded from the authorization token.
	Password string `pulumi:"password"`
	// The registry URL to use in the docker login command.
	ProxyEndpoint string  `pulumi:"proxyEndpoint"`
	RegistryId    *string `pulumi:"registryId"`
	// User name decoded from the authorization token.
	UserName string `pulumi:"userName"`
}

A collection of values returned by getAuthorizationToken.

func GetAuthorizationToken

func GetAuthorizationToken(ctx *pulumi.Context, args *GetAuthorizationTokenArgs, opts ...pulumi.InvokeOption) (*GetAuthorizationTokenResult, error)

The ECR Authorization Token data source allows the authorization token, proxy endpoint, token expiration date, user name and password to be retrieved for an ECR repository.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecr.GetAuthorizationToken(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetCredentialsArgs

type GetCredentialsArgs struct {
	RegistryId string `pulumi:"registryId"`
}

A collection of arguments for invoking getCredentials.

type GetCredentialsResult

type GetCredentialsResult struct {
	AuthorizationToken string `pulumi:"authorizationToken"`
	ExpiresAt          string `pulumi:"expiresAt"`
	// The provider-assigned unique ID for this managed resource.
	Id            string `pulumi:"id"`
	ProxyEndpoint string `pulumi:"proxyEndpoint"`
	RegistryId    string `pulumi:"registryId"`
}

A collection of values returned by getCredentials.

func GetCredentials

func GetCredentials(ctx *pulumi.Context, args *GetCredentialsArgs, opts ...pulumi.InvokeOption) (*GetCredentialsResult, error)

type GetImageArgs

type GetImageArgs struct {
	// The sha256 digest of the image manifest. At least one of `imageDigest` or `imageTag` must be specified.
	ImageDigest *string `pulumi:"imageDigest"`
	// The tag associated with this image. At least one of `imageDigest` or `imageTag` must be specified.
	ImageTag *string `pulumi:"imageTag"`
	// The ID of the Registry where the repository resides.
	RegistryId *string `pulumi:"registryId"`
	// The name of the ECR Repository.
	RepositoryName string `pulumi:"repositoryName"`
}

A collection of arguments for invoking getImage.

type GetImageResult

type GetImageResult struct {
	// The provider-assigned unique ID for this managed resource.
	Id          string `pulumi:"id"`
	ImageDigest string `pulumi:"imageDigest"`
	// The date and time, expressed as a unix timestamp, at which the current image was pushed to the repository.
	ImagePushedAt int `pulumi:"imagePushedAt"`
	// The size, in bytes, of the image in the repository.
	ImageSizeInBytes int     `pulumi:"imageSizeInBytes"`
	ImageTag         *string `pulumi:"imageTag"`
	// The list of tags associated with this image.
	ImageTags      []string `pulumi:"imageTags"`
	RegistryId     string   `pulumi:"registryId"`
	RepositoryName string   `pulumi:"repositoryName"`
}

A collection of values returned by getImage.

func GetImage

func GetImage(ctx *pulumi.Context, args *GetImageArgs, opts ...pulumi.InvokeOption) (*GetImageResult, error)

The ECR Image data source allows the details of an image with a particular tag or digest to be retrieved.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "latest"
		_, err := ecr.GetImage(ctx, &ecr.GetImageArgs{
			ImageTag:       &opt0,
			RepositoryName: "my/service",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetRepositoryEncryptionConfiguration

type GetRepositoryEncryptionConfiguration struct {
	// The encryption type to use for the repository, either `AES256` or `KMS`.
	EncryptionType string `pulumi:"encryptionType"`
	// If `encryptionType` is `KMS`, the ARN of the KMS key used.
	KmsKey string `pulumi:"kmsKey"`
}

type GetRepositoryEncryptionConfigurationArgs

type GetRepositoryEncryptionConfigurationArgs struct {
	// The encryption type to use for the repository, either `AES256` or `KMS`.
	EncryptionType pulumi.StringInput `pulumi:"encryptionType"`
	// If `encryptionType` is `KMS`, the ARN of the KMS key used.
	KmsKey pulumi.StringInput `pulumi:"kmsKey"`
}

func (GetRepositoryEncryptionConfigurationArgs) ElementType

func (GetRepositoryEncryptionConfigurationArgs) ToGetRepositoryEncryptionConfigurationOutput

func (i GetRepositoryEncryptionConfigurationArgs) ToGetRepositoryEncryptionConfigurationOutput() GetRepositoryEncryptionConfigurationOutput

func (GetRepositoryEncryptionConfigurationArgs) ToGetRepositoryEncryptionConfigurationOutputWithContext

func (i GetRepositoryEncryptionConfigurationArgs) ToGetRepositoryEncryptionConfigurationOutputWithContext(ctx context.Context) GetRepositoryEncryptionConfigurationOutput

type GetRepositoryEncryptionConfigurationArray

type GetRepositoryEncryptionConfigurationArray []GetRepositoryEncryptionConfigurationInput

func (GetRepositoryEncryptionConfigurationArray) ElementType

func (GetRepositoryEncryptionConfigurationArray) ToGetRepositoryEncryptionConfigurationArrayOutput

func (i GetRepositoryEncryptionConfigurationArray) ToGetRepositoryEncryptionConfigurationArrayOutput() GetRepositoryEncryptionConfigurationArrayOutput

func (GetRepositoryEncryptionConfigurationArray) ToGetRepositoryEncryptionConfigurationArrayOutputWithContext

func (i GetRepositoryEncryptionConfigurationArray) ToGetRepositoryEncryptionConfigurationArrayOutputWithContext(ctx context.Context) GetRepositoryEncryptionConfigurationArrayOutput

type GetRepositoryEncryptionConfigurationArrayInput

type GetRepositoryEncryptionConfigurationArrayInput interface {
	pulumi.Input

	ToGetRepositoryEncryptionConfigurationArrayOutput() GetRepositoryEncryptionConfigurationArrayOutput
	ToGetRepositoryEncryptionConfigurationArrayOutputWithContext(context.Context) GetRepositoryEncryptionConfigurationArrayOutput
}

GetRepositoryEncryptionConfigurationArrayInput is an input type that accepts GetRepositoryEncryptionConfigurationArray and GetRepositoryEncryptionConfigurationArrayOutput values. You can construct a concrete instance of `GetRepositoryEncryptionConfigurationArrayInput` via:

GetRepositoryEncryptionConfigurationArray{ GetRepositoryEncryptionConfigurationArgs{...} }

type GetRepositoryEncryptionConfigurationArrayOutput

type GetRepositoryEncryptionConfigurationArrayOutput struct{ *pulumi.OutputState }

func (GetRepositoryEncryptionConfigurationArrayOutput) ElementType

func (GetRepositoryEncryptionConfigurationArrayOutput) Index

func (GetRepositoryEncryptionConfigurationArrayOutput) ToGetRepositoryEncryptionConfigurationArrayOutput

func (o GetRepositoryEncryptionConfigurationArrayOutput) ToGetRepositoryEncryptionConfigurationArrayOutput() GetRepositoryEncryptionConfigurationArrayOutput

func (GetRepositoryEncryptionConfigurationArrayOutput) ToGetRepositoryEncryptionConfigurationArrayOutputWithContext

func (o GetRepositoryEncryptionConfigurationArrayOutput) ToGetRepositoryEncryptionConfigurationArrayOutputWithContext(ctx context.Context) GetRepositoryEncryptionConfigurationArrayOutput

type GetRepositoryEncryptionConfigurationInput

type GetRepositoryEncryptionConfigurationInput interface {
	pulumi.Input

	ToGetRepositoryEncryptionConfigurationOutput() GetRepositoryEncryptionConfigurationOutput
	ToGetRepositoryEncryptionConfigurationOutputWithContext(context.Context) GetRepositoryEncryptionConfigurationOutput
}

GetRepositoryEncryptionConfigurationInput is an input type that accepts GetRepositoryEncryptionConfigurationArgs and GetRepositoryEncryptionConfigurationOutput values. You can construct a concrete instance of `GetRepositoryEncryptionConfigurationInput` via:

GetRepositoryEncryptionConfigurationArgs{...}

type GetRepositoryEncryptionConfigurationOutput

type GetRepositoryEncryptionConfigurationOutput struct{ *pulumi.OutputState }

func (GetRepositoryEncryptionConfigurationOutput) ElementType

func (GetRepositoryEncryptionConfigurationOutput) EncryptionType

The encryption type to use for the repository, either `AES256` or `KMS`.

func (GetRepositoryEncryptionConfigurationOutput) KmsKey

If `encryptionType` is `KMS`, the ARN of the KMS key used.

func (GetRepositoryEncryptionConfigurationOutput) ToGetRepositoryEncryptionConfigurationOutput

func (o GetRepositoryEncryptionConfigurationOutput) ToGetRepositoryEncryptionConfigurationOutput() GetRepositoryEncryptionConfigurationOutput

func (GetRepositoryEncryptionConfigurationOutput) ToGetRepositoryEncryptionConfigurationOutputWithContext

func (o GetRepositoryEncryptionConfigurationOutput) ToGetRepositoryEncryptionConfigurationOutputWithContext(ctx context.Context) GetRepositoryEncryptionConfigurationOutput

type GetRepositoryImageScanningConfiguration

type GetRepositoryImageScanningConfiguration struct {
	// Indicates whether images are scanned after being pushed to the repository.
	ScanOnPush bool `pulumi:"scanOnPush"`
}

type GetRepositoryImageScanningConfigurationArgs

type GetRepositoryImageScanningConfigurationArgs struct {
	// Indicates whether images are scanned after being pushed to the repository.
	ScanOnPush pulumi.BoolInput `pulumi:"scanOnPush"`
}

func (GetRepositoryImageScanningConfigurationArgs) ElementType

func (GetRepositoryImageScanningConfigurationArgs) ToGetRepositoryImageScanningConfigurationOutput

func (i GetRepositoryImageScanningConfigurationArgs) ToGetRepositoryImageScanningConfigurationOutput() GetRepositoryImageScanningConfigurationOutput

func (GetRepositoryImageScanningConfigurationArgs) ToGetRepositoryImageScanningConfigurationOutputWithContext

func (i GetRepositoryImageScanningConfigurationArgs) ToGetRepositoryImageScanningConfigurationOutputWithContext(ctx context.Context) GetRepositoryImageScanningConfigurationOutput

type GetRepositoryImageScanningConfigurationArray

type GetRepositoryImageScanningConfigurationArray []GetRepositoryImageScanningConfigurationInput

func (GetRepositoryImageScanningConfigurationArray) ElementType

func (GetRepositoryImageScanningConfigurationArray) ToGetRepositoryImageScanningConfigurationArrayOutput

func (i GetRepositoryImageScanningConfigurationArray) ToGetRepositoryImageScanningConfigurationArrayOutput() GetRepositoryImageScanningConfigurationArrayOutput

func (GetRepositoryImageScanningConfigurationArray) ToGetRepositoryImageScanningConfigurationArrayOutputWithContext

func (i GetRepositoryImageScanningConfigurationArray) ToGetRepositoryImageScanningConfigurationArrayOutputWithContext(ctx context.Context) GetRepositoryImageScanningConfigurationArrayOutput

type GetRepositoryImageScanningConfigurationArrayInput

type GetRepositoryImageScanningConfigurationArrayInput interface {
	pulumi.Input

	ToGetRepositoryImageScanningConfigurationArrayOutput() GetRepositoryImageScanningConfigurationArrayOutput
	ToGetRepositoryImageScanningConfigurationArrayOutputWithContext(context.Context) GetRepositoryImageScanningConfigurationArrayOutput
}

GetRepositoryImageScanningConfigurationArrayInput is an input type that accepts GetRepositoryImageScanningConfigurationArray and GetRepositoryImageScanningConfigurationArrayOutput values. You can construct a concrete instance of `GetRepositoryImageScanningConfigurationArrayInput` via:

GetRepositoryImageScanningConfigurationArray{ GetRepositoryImageScanningConfigurationArgs{...} }

type GetRepositoryImageScanningConfigurationArrayOutput

type GetRepositoryImageScanningConfigurationArrayOutput struct{ *pulumi.OutputState }

func (GetRepositoryImageScanningConfigurationArrayOutput) ElementType

func (GetRepositoryImageScanningConfigurationArrayOutput) Index

func (GetRepositoryImageScanningConfigurationArrayOutput) ToGetRepositoryImageScanningConfigurationArrayOutput

func (o GetRepositoryImageScanningConfigurationArrayOutput) ToGetRepositoryImageScanningConfigurationArrayOutput() GetRepositoryImageScanningConfigurationArrayOutput

func (GetRepositoryImageScanningConfigurationArrayOutput) ToGetRepositoryImageScanningConfigurationArrayOutputWithContext

func (o GetRepositoryImageScanningConfigurationArrayOutput) ToGetRepositoryImageScanningConfigurationArrayOutputWithContext(ctx context.Context) GetRepositoryImageScanningConfigurationArrayOutput

type GetRepositoryImageScanningConfigurationInput

type GetRepositoryImageScanningConfigurationInput interface {
	pulumi.Input

	ToGetRepositoryImageScanningConfigurationOutput() GetRepositoryImageScanningConfigurationOutput
	ToGetRepositoryImageScanningConfigurationOutputWithContext(context.Context) GetRepositoryImageScanningConfigurationOutput
}

GetRepositoryImageScanningConfigurationInput is an input type that accepts GetRepositoryImageScanningConfigurationArgs and GetRepositoryImageScanningConfigurationOutput values. You can construct a concrete instance of `GetRepositoryImageScanningConfigurationInput` via:

GetRepositoryImageScanningConfigurationArgs{...}

type GetRepositoryImageScanningConfigurationOutput

type GetRepositoryImageScanningConfigurationOutput struct{ *pulumi.OutputState }

func (GetRepositoryImageScanningConfigurationOutput) ElementType

func (GetRepositoryImageScanningConfigurationOutput) ScanOnPush

Indicates whether images are scanned after being pushed to the repository.

func (GetRepositoryImageScanningConfigurationOutput) ToGetRepositoryImageScanningConfigurationOutput

func (o GetRepositoryImageScanningConfigurationOutput) ToGetRepositoryImageScanningConfigurationOutput() GetRepositoryImageScanningConfigurationOutput

func (GetRepositoryImageScanningConfigurationOutput) ToGetRepositoryImageScanningConfigurationOutputWithContext

func (o GetRepositoryImageScanningConfigurationOutput) ToGetRepositoryImageScanningConfigurationOutputWithContext(ctx context.Context) GetRepositoryImageScanningConfigurationOutput

type LifecyclePolicy

type LifecyclePolicy struct {
	pulumi.CustomResourceState

	// The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs.
	Policy pulumi.StringOutput `pulumi:"policy"`
	// The registry ID where the repository was created.
	RegistryId pulumi.StringOutput `pulumi:"registryId"`
	// Name of the repository to apply the policy.
	Repository pulumi.StringOutput `pulumi:"repository"`
}

Manages an ECR repository lifecycle policy.

> **NOTE:** Only one `ecr.LifecyclePolicy` resource can be used with the same ECR repository. To apply multiple rules, they must be combined in the `policy` JSON.

> **NOTE:** The AWS ECR API seems to reorder rules based on `rulePriority`. If you define multiple rules that are not sorted in ascending `rulePriority` order in the this provider code, the resource will be flagged for recreation every deployment.

## Example Usage ### Policy on untagged image

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := ecr.NewRepository(ctx, "foo", nil)
		if err != nil {
			return err
		}
		_, err = ecr.NewLifecyclePolicy(ctx, "foopolicy", &ecr.LifecyclePolicyArgs{
			Repository: foo.Name,
			Policy:     pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"rules\": [\n", "        {\n", "            \"rulePriority\": 1,\n", "            \"description\": \"Expire images older than 14 days\",\n", "            \"selection\": {\n", "                \"tagStatus\": \"untagged\",\n", "                \"countType\": \"sinceImagePushed\",\n", "                \"countUnit\": \"days\",\n", "                \"countNumber\": 14\n", "            },\n", "            \"action\": {\n", "                \"type\": \"expire\"\n", "            }\n", "        }\n", "    ]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Policy on tagged image

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := ecr.NewRepository(ctx, "foo", nil)
		if err != nil {
			return err
		}
		_, err = ecr.NewLifecyclePolicy(ctx, "foopolicy", &ecr.LifecyclePolicyArgs{
			Repository: foo.Name,
			Policy:     pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"rules\": [\n", "        {\n", "            \"rulePriority\": 1,\n", "            \"description\": \"Keep last 30 images\",\n", "            \"selection\": {\n", "                \"tagStatus\": \"tagged\",\n", "                \"tagPrefixList\": [\"v\"],\n", "                \"countType\": \"imageCountMoreThan\",\n", "                \"countNumber\": 30\n", "            },\n", "            \"action\": {\n", "                \"type\": \"expire\"\n", "            }\n", "        }\n", "    ]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

ECR Lifecycle Policy can be imported using the name of the repository, e.g.

```sh

$ pulumi import aws:ecr/lifecyclePolicy:LifecyclePolicy example tf-example

```

func GetLifecyclePolicy

func GetLifecyclePolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LifecyclePolicyState, opts ...pulumi.ResourceOption) (*LifecyclePolicy, error)

GetLifecyclePolicy gets an existing LifecyclePolicy 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 NewLifecyclePolicy

func NewLifecyclePolicy(ctx *pulumi.Context,
	name string, args *LifecyclePolicyArgs, opts ...pulumi.ResourceOption) (*LifecyclePolicy, error)

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

func (*LifecyclePolicy) ElementType

func (*LifecyclePolicy) ElementType() reflect.Type

func (*LifecyclePolicy) ToLifecyclePolicyOutput

func (i *LifecyclePolicy) ToLifecyclePolicyOutput() LifecyclePolicyOutput

func (*LifecyclePolicy) ToLifecyclePolicyOutputWithContext

func (i *LifecyclePolicy) ToLifecyclePolicyOutputWithContext(ctx context.Context) LifecyclePolicyOutput

func (*LifecyclePolicy) ToLifecyclePolicyPtrOutput

func (i *LifecyclePolicy) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput

func (*LifecyclePolicy) ToLifecyclePolicyPtrOutputWithContext

func (i *LifecyclePolicy) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput

type LifecyclePolicyArgs

type LifecyclePolicyArgs struct {
	// The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs.
	Policy pulumi.Input
	// Name of the repository to apply the policy.
	Repository pulumi.StringInput
}

The set of arguments for constructing a LifecyclePolicy resource.

func (LifecyclePolicyArgs) ElementType

func (LifecyclePolicyArgs) ElementType() reflect.Type

type LifecyclePolicyArray

type LifecyclePolicyArray []LifecyclePolicyInput

func (LifecyclePolicyArray) ElementType

func (LifecyclePolicyArray) ElementType() reflect.Type

func (LifecyclePolicyArray) ToLifecyclePolicyArrayOutput

func (i LifecyclePolicyArray) ToLifecyclePolicyArrayOutput() LifecyclePolicyArrayOutput

func (LifecyclePolicyArray) ToLifecyclePolicyArrayOutputWithContext

func (i LifecyclePolicyArray) ToLifecyclePolicyArrayOutputWithContext(ctx context.Context) LifecyclePolicyArrayOutput

type LifecyclePolicyArrayInput

type LifecyclePolicyArrayInput interface {
	pulumi.Input

	ToLifecyclePolicyArrayOutput() LifecyclePolicyArrayOutput
	ToLifecyclePolicyArrayOutputWithContext(context.Context) LifecyclePolicyArrayOutput
}

LifecyclePolicyArrayInput is an input type that accepts LifecyclePolicyArray and LifecyclePolicyArrayOutput values. You can construct a concrete instance of `LifecyclePolicyArrayInput` via:

LifecyclePolicyArray{ LifecyclePolicyArgs{...} }

type LifecyclePolicyArrayOutput

type LifecyclePolicyArrayOutput struct{ *pulumi.OutputState }

func (LifecyclePolicyArrayOutput) ElementType

func (LifecyclePolicyArrayOutput) ElementType() reflect.Type

func (LifecyclePolicyArrayOutput) Index

func (LifecyclePolicyArrayOutput) ToLifecyclePolicyArrayOutput

func (o LifecyclePolicyArrayOutput) ToLifecyclePolicyArrayOutput() LifecyclePolicyArrayOutput

func (LifecyclePolicyArrayOutput) ToLifecyclePolicyArrayOutputWithContext

func (o LifecyclePolicyArrayOutput) ToLifecyclePolicyArrayOutputWithContext(ctx context.Context) LifecyclePolicyArrayOutput

type LifecyclePolicyInput

type LifecyclePolicyInput interface {
	pulumi.Input

	ToLifecyclePolicyOutput() LifecyclePolicyOutput
	ToLifecyclePolicyOutputWithContext(ctx context.Context) LifecyclePolicyOutput
}

type LifecyclePolicyMap

type LifecyclePolicyMap map[string]LifecyclePolicyInput

func (LifecyclePolicyMap) ElementType

func (LifecyclePolicyMap) ElementType() reflect.Type

func (LifecyclePolicyMap) ToLifecyclePolicyMapOutput

func (i LifecyclePolicyMap) ToLifecyclePolicyMapOutput() LifecyclePolicyMapOutput

func (LifecyclePolicyMap) ToLifecyclePolicyMapOutputWithContext

func (i LifecyclePolicyMap) ToLifecyclePolicyMapOutputWithContext(ctx context.Context) LifecyclePolicyMapOutput

type LifecyclePolicyMapInput

type LifecyclePolicyMapInput interface {
	pulumi.Input

	ToLifecyclePolicyMapOutput() LifecyclePolicyMapOutput
	ToLifecyclePolicyMapOutputWithContext(context.Context) LifecyclePolicyMapOutput
}

LifecyclePolicyMapInput is an input type that accepts LifecyclePolicyMap and LifecyclePolicyMapOutput values. You can construct a concrete instance of `LifecyclePolicyMapInput` via:

LifecyclePolicyMap{ "key": LifecyclePolicyArgs{...} }

type LifecyclePolicyMapOutput

type LifecyclePolicyMapOutput struct{ *pulumi.OutputState }

func (LifecyclePolicyMapOutput) ElementType

func (LifecyclePolicyMapOutput) ElementType() reflect.Type

func (LifecyclePolicyMapOutput) MapIndex

func (LifecyclePolicyMapOutput) ToLifecyclePolicyMapOutput

func (o LifecyclePolicyMapOutput) ToLifecyclePolicyMapOutput() LifecyclePolicyMapOutput

func (LifecyclePolicyMapOutput) ToLifecyclePolicyMapOutputWithContext

func (o LifecyclePolicyMapOutput) ToLifecyclePolicyMapOutputWithContext(ctx context.Context) LifecyclePolicyMapOutput

type LifecyclePolicyOutput

type LifecyclePolicyOutput struct {
	*pulumi.OutputState
}

func (LifecyclePolicyOutput) ElementType

func (LifecyclePolicyOutput) ElementType() reflect.Type

func (LifecyclePolicyOutput) ToLifecyclePolicyOutput

func (o LifecyclePolicyOutput) ToLifecyclePolicyOutput() LifecyclePolicyOutput

func (LifecyclePolicyOutput) ToLifecyclePolicyOutputWithContext

func (o LifecyclePolicyOutput) ToLifecyclePolicyOutputWithContext(ctx context.Context) LifecyclePolicyOutput

func (LifecyclePolicyOutput) ToLifecyclePolicyPtrOutput

func (o LifecyclePolicyOutput) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput

func (LifecyclePolicyOutput) ToLifecyclePolicyPtrOutputWithContext

func (o LifecyclePolicyOutput) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput

type LifecyclePolicyPtrInput

type LifecyclePolicyPtrInput interface {
	pulumi.Input

	ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput
	ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput
}

type LifecyclePolicyPtrOutput

type LifecyclePolicyPtrOutput struct {
	*pulumi.OutputState
}

func (LifecyclePolicyPtrOutput) ElementType

func (LifecyclePolicyPtrOutput) ElementType() reflect.Type

func (LifecyclePolicyPtrOutput) ToLifecyclePolicyPtrOutput

func (o LifecyclePolicyPtrOutput) ToLifecyclePolicyPtrOutput() LifecyclePolicyPtrOutput

func (LifecyclePolicyPtrOutput) ToLifecyclePolicyPtrOutputWithContext

func (o LifecyclePolicyPtrOutput) ToLifecyclePolicyPtrOutputWithContext(ctx context.Context) LifecyclePolicyPtrOutput

type LifecyclePolicyState

type LifecyclePolicyState struct {
	// The policy document. This is a JSON formatted string. See more details about [Policy Parameters](http://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html#lifecycle_policy_parameters) in the official AWS docs.
	Policy pulumi.StringPtrInput
	// The registry ID where the repository was created.
	RegistryId pulumi.StringPtrInput
	// Name of the repository to apply the policy.
	Repository pulumi.StringPtrInput
}

func (LifecyclePolicyState) ElementType

func (LifecyclePolicyState) ElementType() reflect.Type

type LookupRepositoryArgs

type LookupRepositoryArgs struct {
	// The name of the ECR Repository.
	Name string `pulumi:"name"`
	// The registry ID where the repository was created.
	RegistryId *string `pulumi:"registryId"`
	// A map of tags assigned to the resource.
	Tags map[string]string `pulumi:"tags"`
}

A collection of arguments for invoking getRepository.

type LookupRepositoryResult

type LookupRepositoryResult struct {
	// Full ARN of the repository.
	Arn string `pulumi:"arn"`
	// Encryption configuration for the repository. See Encryption Configuration below.
	EncryptionConfigurations []GetRepositoryEncryptionConfiguration `pulumi:"encryptionConfigurations"`
	// The provider-assigned unique ID for this managed resource.
	Id string `pulumi:"id"`
	// Configuration block that defines image scanning configuration for the repository. See Image Scanning Configuration below.
	ImageScanningConfigurations []GetRepositoryImageScanningConfiguration `pulumi:"imageScanningConfigurations"`
	// The tag mutability setting for the repository.
	ImageTagMutability string `pulumi:"imageTagMutability"`
	Name               string `pulumi:"name"`
	RegistryId         string `pulumi:"registryId"`
	// The URL of the repository (in the form `aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName`).
	RepositoryUrl string `pulumi:"repositoryUrl"`
	// A map of tags assigned to the resource.
	Tags map[string]string `pulumi:"tags"`
}

A collection of values returned by getRepository.

func LookupRepository

func LookupRepository(ctx *pulumi.Context, args *LookupRepositoryArgs, opts ...pulumi.InvokeOption) (*LookupRepositoryResult, error)

The ECR Repository data source allows the ARN, Repository URI and Registry ID to be retrieved for an ECR repository.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecr.LookupRepository(ctx, &ecr.LookupRepositoryArgs{
			Name: "ecr-repository",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type Repository

type Repository struct {
	pulumi.CustomResourceState

	// Full ARN of the repository.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Encryption configuration for the repository. See below for schema.
	EncryptionConfigurations RepositoryEncryptionConfigurationArrayOutput `pulumi:"encryptionConfigurations"`
	// Configuration block that defines image scanning configuration for the repository. By default, image scanning must be manually triggered. See the [ECR User Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html) for more information about image scanning.
	ImageScanningConfiguration RepositoryImageScanningConfigurationPtrOutput `pulumi:"imageScanningConfiguration"`
	// The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE`. Defaults to `MUTABLE`.
	ImageTagMutability pulumi.StringPtrOutput `pulumi:"imageTagMutability"`
	// Name of the repository.
	Name pulumi.StringOutput `pulumi:"name"`
	// The registry ID where the repository was created.
	RegistryId pulumi.StringOutput `pulumi:"registryId"`
	// The URL of the repository (in the form `aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName`).
	RepositoryUrl pulumi.StringOutput `pulumi:"repositoryUrl"`
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

Provides an Elastic Container Registry Repository.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ecr.NewRepository(ctx, "foo", &ecr.RepositoryArgs{
			ImageScanningConfiguration: &ecr.RepositoryImageScanningConfigurationArgs{
				ScanOnPush: pulumi.Bool(true),
			},
			ImageTagMutability: pulumi.String("MUTABLE"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

ECR Repositories can be imported using the `name`, e.g.

```sh

$ pulumi import aws:ecr/repository:Repository service test-service

```

func GetRepository

func GetRepository(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RepositoryState, opts ...pulumi.ResourceOption) (*Repository, error)

GetRepository gets an existing Repository 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 NewRepository

func NewRepository(ctx *pulumi.Context,
	name string, args *RepositoryArgs, opts ...pulumi.ResourceOption) (*Repository, error)

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

func (*Repository) ElementType

func (*Repository) ElementType() reflect.Type

func (*Repository) ToRepositoryOutput

func (i *Repository) ToRepositoryOutput() RepositoryOutput

func (*Repository) ToRepositoryOutputWithContext

func (i *Repository) ToRepositoryOutputWithContext(ctx context.Context) RepositoryOutput

func (*Repository) ToRepositoryPtrOutput

func (i *Repository) ToRepositoryPtrOutput() RepositoryPtrOutput

func (*Repository) ToRepositoryPtrOutputWithContext

func (i *Repository) ToRepositoryPtrOutputWithContext(ctx context.Context) RepositoryPtrOutput

type RepositoryArgs

type RepositoryArgs struct {
	// Encryption configuration for the repository. See below for schema.
	EncryptionConfigurations RepositoryEncryptionConfigurationArrayInput
	// Configuration block that defines image scanning configuration for the repository. By default, image scanning must be manually triggered. See the [ECR User Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html) for more information about image scanning.
	ImageScanningConfiguration RepositoryImageScanningConfigurationPtrInput
	// The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE`. Defaults to `MUTABLE`.
	ImageTagMutability pulumi.StringPtrInput
	// Name of the repository.
	Name pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a Repository resource.

func (RepositoryArgs) ElementType

func (RepositoryArgs) ElementType() reflect.Type

type RepositoryArray

type RepositoryArray []RepositoryInput

func (RepositoryArray) ElementType

func (RepositoryArray) ElementType() reflect.Type

func (RepositoryArray) ToRepositoryArrayOutput

func (i RepositoryArray) ToRepositoryArrayOutput() RepositoryArrayOutput

func (RepositoryArray) ToRepositoryArrayOutputWithContext

func (i RepositoryArray) ToRepositoryArrayOutputWithContext(ctx context.Context) RepositoryArrayOutput

type RepositoryArrayInput

type RepositoryArrayInput interface {
	pulumi.Input

	ToRepositoryArrayOutput() RepositoryArrayOutput
	ToRepositoryArrayOutputWithContext(context.Context) RepositoryArrayOutput
}

RepositoryArrayInput is an input type that accepts RepositoryArray and RepositoryArrayOutput values. You can construct a concrete instance of `RepositoryArrayInput` via:

RepositoryArray{ RepositoryArgs{...} }

type RepositoryArrayOutput

type RepositoryArrayOutput struct{ *pulumi.OutputState }

func (RepositoryArrayOutput) ElementType

func (RepositoryArrayOutput) ElementType() reflect.Type

func (RepositoryArrayOutput) Index

func (RepositoryArrayOutput) ToRepositoryArrayOutput

func (o RepositoryArrayOutput) ToRepositoryArrayOutput() RepositoryArrayOutput

func (RepositoryArrayOutput) ToRepositoryArrayOutputWithContext

func (o RepositoryArrayOutput) ToRepositoryArrayOutputWithContext(ctx context.Context) RepositoryArrayOutput

type RepositoryEncryptionConfiguration

type RepositoryEncryptionConfiguration struct {
	// The encryption type to use for the repository. Valid values are `AES256` or `KMS`. Defaults to `AES256`.
	EncryptionType *string `pulumi:"encryptionType"`
	// The ARN of the KMS key to use when `encryptionType` is `KMS`. If not specified, uses the default AWS managed key for ECR.
	KmsKey *string `pulumi:"kmsKey"`
}

type RepositoryEncryptionConfigurationArgs

type RepositoryEncryptionConfigurationArgs struct {
	// The encryption type to use for the repository. Valid values are `AES256` or `KMS`. Defaults to `AES256`.
	EncryptionType pulumi.StringPtrInput `pulumi:"encryptionType"`
	// The ARN of the KMS key to use when `encryptionType` is `KMS`. If not specified, uses the default AWS managed key for ECR.
	KmsKey pulumi.StringPtrInput `pulumi:"kmsKey"`
}

func (RepositoryEncryptionConfigurationArgs) ElementType

func (RepositoryEncryptionConfigurationArgs) ToRepositoryEncryptionConfigurationOutput

func (i RepositoryEncryptionConfigurationArgs) ToRepositoryEncryptionConfigurationOutput() RepositoryEncryptionConfigurationOutput

func (RepositoryEncryptionConfigurationArgs) ToRepositoryEncryptionConfigurationOutputWithContext

func (i RepositoryEncryptionConfigurationArgs) ToRepositoryEncryptionConfigurationOutputWithContext(ctx context.Context) RepositoryEncryptionConfigurationOutput

type RepositoryEncryptionConfigurationArray

type RepositoryEncryptionConfigurationArray []RepositoryEncryptionConfigurationInput

func (RepositoryEncryptionConfigurationArray) ElementType

func (RepositoryEncryptionConfigurationArray) ToRepositoryEncryptionConfigurationArrayOutput

func (i RepositoryEncryptionConfigurationArray) ToRepositoryEncryptionConfigurationArrayOutput() RepositoryEncryptionConfigurationArrayOutput

func (RepositoryEncryptionConfigurationArray) ToRepositoryEncryptionConfigurationArrayOutputWithContext

func (i RepositoryEncryptionConfigurationArray) ToRepositoryEncryptionConfigurationArrayOutputWithContext(ctx context.Context) RepositoryEncryptionConfigurationArrayOutput

type RepositoryEncryptionConfigurationArrayInput

type RepositoryEncryptionConfigurationArrayInput interface {
	pulumi.Input

	ToRepositoryEncryptionConfigurationArrayOutput() RepositoryEncryptionConfigurationArrayOutput
	ToRepositoryEncryptionConfigurationArrayOutputWithContext(context.Context) RepositoryEncryptionConfigurationArrayOutput
}

RepositoryEncryptionConfigurationArrayInput is an input type that accepts RepositoryEncryptionConfigurationArray and RepositoryEncryptionConfigurationArrayOutput values. You can construct a concrete instance of `RepositoryEncryptionConfigurationArrayInput` via:

RepositoryEncryptionConfigurationArray{ RepositoryEncryptionConfigurationArgs{...} }

type RepositoryEncryptionConfigurationArrayOutput

type RepositoryEncryptionConfigurationArrayOutput struct{ *pulumi.OutputState }

func (RepositoryEncryptionConfigurationArrayOutput) ElementType

func (RepositoryEncryptionConfigurationArrayOutput) Index

func (RepositoryEncryptionConfigurationArrayOutput) ToRepositoryEncryptionConfigurationArrayOutput

func (o RepositoryEncryptionConfigurationArrayOutput) ToRepositoryEncryptionConfigurationArrayOutput() RepositoryEncryptionConfigurationArrayOutput

func (RepositoryEncryptionConfigurationArrayOutput) ToRepositoryEncryptionConfigurationArrayOutputWithContext

func (o RepositoryEncryptionConfigurationArrayOutput) ToRepositoryEncryptionConfigurationArrayOutputWithContext(ctx context.Context) RepositoryEncryptionConfigurationArrayOutput

type RepositoryEncryptionConfigurationInput

type RepositoryEncryptionConfigurationInput interface {
	pulumi.Input

	ToRepositoryEncryptionConfigurationOutput() RepositoryEncryptionConfigurationOutput
	ToRepositoryEncryptionConfigurationOutputWithContext(context.Context) RepositoryEncryptionConfigurationOutput
}

RepositoryEncryptionConfigurationInput is an input type that accepts RepositoryEncryptionConfigurationArgs and RepositoryEncryptionConfigurationOutput values. You can construct a concrete instance of `RepositoryEncryptionConfigurationInput` via:

RepositoryEncryptionConfigurationArgs{...}

type RepositoryEncryptionConfigurationOutput

type RepositoryEncryptionConfigurationOutput struct{ *pulumi.OutputState }

func (RepositoryEncryptionConfigurationOutput) ElementType

func (RepositoryEncryptionConfigurationOutput) EncryptionType

The encryption type to use for the repository. Valid values are `AES256` or `KMS`. Defaults to `AES256`.

func (RepositoryEncryptionConfigurationOutput) KmsKey

The ARN of the KMS key to use when `encryptionType` is `KMS`. If not specified, uses the default AWS managed key for ECR.

func (RepositoryEncryptionConfigurationOutput) ToRepositoryEncryptionConfigurationOutput

func (o RepositoryEncryptionConfigurationOutput) ToRepositoryEncryptionConfigurationOutput() RepositoryEncryptionConfigurationOutput

func (RepositoryEncryptionConfigurationOutput) ToRepositoryEncryptionConfigurationOutputWithContext

func (o RepositoryEncryptionConfigurationOutput) ToRepositoryEncryptionConfigurationOutputWithContext(ctx context.Context) RepositoryEncryptionConfigurationOutput

type RepositoryImageScanningConfiguration

type RepositoryImageScanningConfiguration struct {
	// Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).
	ScanOnPush bool `pulumi:"scanOnPush"`
}

type RepositoryImageScanningConfigurationArgs

type RepositoryImageScanningConfigurationArgs struct {
	// Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).
	ScanOnPush pulumi.BoolInput `pulumi:"scanOnPush"`
}

func (RepositoryImageScanningConfigurationArgs) ElementType

func (RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationOutput

func (i RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationOutput() RepositoryImageScanningConfigurationOutput

func (RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationOutputWithContext

func (i RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationOutputWithContext(ctx context.Context) RepositoryImageScanningConfigurationOutput

func (RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationPtrOutput

func (i RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationPtrOutput() RepositoryImageScanningConfigurationPtrOutput

func (RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationPtrOutputWithContext

func (i RepositoryImageScanningConfigurationArgs) ToRepositoryImageScanningConfigurationPtrOutputWithContext(ctx context.Context) RepositoryImageScanningConfigurationPtrOutput

type RepositoryImageScanningConfigurationInput

type RepositoryImageScanningConfigurationInput interface {
	pulumi.Input

	ToRepositoryImageScanningConfigurationOutput() RepositoryImageScanningConfigurationOutput
	ToRepositoryImageScanningConfigurationOutputWithContext(context.Context) RepositoryImageScanningConfigurationOutput
}

RepositoryImageScanningConfigurationInput is an input type that accepts RepositoryImageScanningConfigurationArgs and RepositoryImageScanningConfigurationOutput values. You can construct a concrete instance of `RepositoryImageScanningConfigurationInput` via:

RepositoryImageScanningConfigurationArgs{...}

type RepositoryImageScanningConfigurationOutput

type RepositoryImageScanningConfigurationOutput struct{ *pulumi.OutputState }

func (RepositoryImageScanningConfigurationOutput) ElementType

func (RepositoryImageScanningConfigurationOutput) ScanOnPush

Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).

func (RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationOutput

func (o RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationOutput() RepositoryImageScanningConfigurationOutput

func (RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationOutputWithContext

func (o RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationOutputWithContext(ctx context.Context) RepositoryImageScanningConfigurationOutput

func (RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationPtrOutput

func (o RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationPtrOutput() RepositoryImageScanningConfigurationPtrOutput

func (RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationPtrOutputWithContext

func (o RepositoryImageScanningConfigurationOutput) ToRepositoryImageScanningConfigurationPtrOutputWithContext(ctx context.Context) RepositoryImageScanningConfigurationPtrOutput

type RepositoryImageScanningConfigurationPtrInput

type RepositoryImageScanningConfigurationPtrInput interface {
	pulumi.Input

	ToRepositoryImageScanningConfigurationPtrOutput() RepositoryImageScanningConfigurationPtrOutput
	ToRepositoryImageScanningConfigurationPtrOutputWithContext(context.Context) RepositoryImageScanningConfigurationPtrOutput
}

RepositoryImageScanningConfigurationPtrInput is an input type that accepts RepositoryImageScanningConfigurationArgs, RepositoryImageScanningConfigurationPtr and RepositoryImageScanningConfigurationPtrOutput values. You can construct a concrete instance of `RepositoryImageScanningConfigurationPtrInput` via:

        RepositoryImageScanningConfigurationArgs{...}

or:

        nil

type RepositoryImageScanningConfigurationPtrOutput

type RepositoryImageScanningConfigurationPtrOutput struct{ *pulumi.OutputState }

func (RepositoryImageScanningConfigurationPtrOutput) Elem

func (RepositoryImageScanningConfigurationPtrOutput) ElementType

func (RepositoryImageScanningConfigurationPtrOutput) ScanOnPush

Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false).

func (RepositoryImageScanningConfigurationPtrOutput) ToRepositoryImageScanningConfigurationPtrOutput

func (o RepositoryImageScanningConfigurationPtrOutput) ToRepositoryImageScanningConfigurationPtrOutput() RepositoryImageScanningConfigurationPtrOutput

func (RepositoryImageScanningConfigurationPtrOutput) ToRepositoryImageScanningConfigurationPtrOutputWithContext

func (o RepositoryImageScanningConfigurationPtrOutput) ToRepositoryImageScanningConfigurationPtrOutputWithContext(ctx context.Context) RepositoryImageScanningConfigurationPtrOutput

type RepositoryInput

type RepositoryInput interface {
	pulumi.Input

	ToRepositoryOutput() RepositoryOutput
	ToRepositoryOutputWithContext(ctx context.Context) RepositoryOutput
}

type RepositoryMap

type RepositoryMap map[string]RepositoryInput

func (RepositoryMap) ElementType

func (RepositoryMap) ElementType() reflect.Type

func (RepositoryMap) ToRepositoryMapOutput

func (i RepositoryMap) ToRepositoryMapOutput() RepositoryMapOutput

func (RepositoryMap) ToRepositoryMapOutputWithContext

func (i RepositoryMap) ToRepositoryMapOutputWithContext(ctx context.Context) RepositoryMapOutput

type RepositoryMapInput

type RepositoryMapInput interface {
	pulumi.Input

	ToRepositoryMapOutput() RepositoryMapOutput
	ToRepositoryMapOutputWithContext(context.Context) RepositoryMapOutput
}

RepositoryMapInput is an input type that accepts RepositoryMap and RepositoryMapOutput values. You can construct a concrete instance of `RepositoryMapInput` via:

RepositoryMap{ "key": RepositoryArgs{...} }

type RepositoryMapOutput

type RepositoryMapOutput struct{ *pulumi.OutputState }

func (RepositoryMapOutput) ElementType

func (RepositoryMapOutput) ElementType() reflect.Type

func (RepositoryMapOutput) MapIndex

func (RepositoryMapOutput) ToRepositoryMapOutput

func (o RepositoryMapOutput) ToRepositoryMapOutput() RepositoryMapOutput

func (RepositoryMapOutput) ToRepositoryMapOutputWithContext

func (o RepositoryMapOutput) ToRepositoryMapOutputWithContext(ctx context.Context) RepositoryMapOutput

type RepositoryOutput

type RepositoryOutput struct {
	*pulumi.OutputState
}

func (RepositoryOutput) ElementType

func (RepositoryOutput) ElementType() reflect.Type

func (RepositoryOutput) ToRepositoryOutput

func (o RepositoryOutput) ToRepositoryOutput() RepositoryOutput

func (RepositoryOutput) ToRepositoryOutputWithContext

func (o RepositoryOutput) ToRepositoryOutputWithContext(ctx context.Context) RepositoryOutput

func (RepositoryOutput) ToRepositoryPtrOutput

func (o RepositoryOutput) ToRepositoryPtrOutput() RepositoryPtrOutput

func (RepositoryOutput) ToRepositoryPtrOutputWithContext

func (o RepositoryOutput) ToRepositoryPtrOutputWithContext(ctx context.Context) RepositoryPtrOutput

type RepositoryPolicy

type RepositoryPolicy struct {
	pulumi.CustomResourceState

	// The policy document. This is a JSON formatted string.
	Policy pulumi.StringOutput `pulumi:"policy"`
	// The registry ID where the repository was created.
	RegistryId pulumi.StringOutput `pulumi:"registryId"`
	// Name of the repository to apply the policy.
	Repository pulumi.StringOutput `pulumi:"repository"`
}

Provides an Elastic Container Registry Repository Policy.

Note that currently only one policy may be applied to a repository.

## Example Usage

```go package main

import (

"fmt"

"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := ecr.NewRepository(ctx, "foo", nil)
		if err != nil {
			return err
		}
		_, err = ecr.NewRepositoryPolicy(ctx, "foopolicy", &ecr.RepositoryPolicyArgs{
			Repository: foo.Name,
			Policy:     pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "{\n", "    \"Version\": \"2008-10-17\",\n", "    \"Statement\": [\n", "        {\n", "            \"Sid\": \"new policy\",\n", "            \"Effect\": \"Allow\",\n", "            \"Principal\": \"*\",\n", "            \"Action\": [\n", "                \"ecr:GetDownloadUrlForLayer\",\n", "                \"ecr:BatchGetImage\",\n", "                \"ecr:BatchCheckLayerAvailability\",\n", "                \"ecr:PutImage\",\n", "                \"ecr:InitiateLayerUpload\",\n", "                \"ecr:UploadLayerPart\",\n", "                \"ecr:CompleteLayerUpload\",\n", "                \"ecr:DescribeRepositories\",\n", "                \"ecr:GetRepositoryPolicy\",\n", "                \"ecr:ListImages\",\n", "                \"ecr:DeleteRepository\",\n", "                \"ecr:BatchDeleteImage\",\n", "                \"ecr:SetRepositoryPolicy\",\n", "                \"ecr:DeleteRepositoryPolicy\"\n", "            ]\n", "        }\n", "    ]\n", "}\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

ECR Repository Policy can be imported using the repository name, e.g.

```sh

$ pulumi import aws:ecr/repositoryPolicy:RepositoryPolicy example example

```

func GetRepositoryPolicy

func GetRepositoryPolicy(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *RepositoryPolicyState, opts ...pulumi.ResourceOption) (*RepositoryPolicy, error)

GetRepositoryPolicy gets an existing RepositoryPolicy 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 NewRepositoryPolicy

func NewRepositoryPolicy(ctx *pulumi.Context,
	name string, args *RepositoryPolicyArgs, opts ...pulumi.ResourceOption) (*RepositoryPolicy, error)

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

func (*RepositoryPolicy) ElementType

func (*RepositoryPolicy) ElementType() reflect.Type

func (*RepositoryPolicy) ToRepositoryPolicyOutput

func (i *RepositoryPolicy) ToRepositoryPolicyOutput() RepositoryPolicyOutput

func (*RepositoryPolicy) ToRepositoryPolicyOutputWithContext

func (i *RepositoryPolicy) ToRepositoryPolicyOutputWithContext(ctx context.Context) RepositoryPolicyOutput

func (*RepositoryPolicy) ToRepositoryPolicyPtrOutput

func (i *RepositoryPolicy) ToRepositoryPolicyPtrOutput() RepositoryPolicyPtrOutput

func (*RepositoryPolicy) ToRepositoryPolicyPtrOutputWithContext

func (i *RepositoryPolicy) ToRepositoryPolicyPtrOutputWithContext(ctx context.Context) RepositoryPolicyPtrOutput

type RepositoryPolicyArgs

type RepositoryPolicyArgs struct {
	// The policy document. This is a JSON formatted string.
	Policy pulumi.Input
	// Name of the repository to apply the policy.
	Repository pulumi.StringInput
}

The set of arguments for constructing a RepositoryPolicy resource.

func (RepositoryPolicyArgs) ElementType

func (RepositoryPolicyArgs) ElementType() reflect.Type

type RepositoryPolicyArray

type RepositoryPolicyArray []RepositoryPolicyInput

func (RepositoryPolicyArray) ElementType

func (RepositoryPolicyArray) ElementType() reflect.Type

func (RepositoryPolicyArray) ToRepositoryPolicyArrayOutput

func (i RepositoryPolicyArray) ToRepositoryPolicyArrayOutput() RepositoryPolicyArrayOutput

func (RepositoryPolicyArray) ToRepositoryPolicyArrayOutputWithContext

func (i RepositoryPolicyArray) ToRepositoryPolicyArrayOutputWithContext(ctx context.Context) RepositoryPolicyArrayOutput

type RepositoryPolicyArrayInput

type RepositoryPolicyArrayInput interface {
	pulumi.Input

	ToRepositoryPolicyArrayOutput() RepositoryPolicyArrayOutput
	ToRepositoryPolicyArrayOutputWithContext(context.Context) RepositoryPolicyArrayOutput
}

RepositoryPolicyArrayInput is an input type that accepts RepositoryPolicyArray and RepositoryPolicyArrayOutput values. You can construct a concrete instance of `RepositoryPolicyArrayInput` via:

RepositoryPolicyArray{ RepositoryPolicyArgs{...} }

type RepositoryPolicyArrayOutput

type RepositoryPolicyArrayOutput struct{ *pulumi.OutputState }

func (RepositoryPolicyArrayOutput) ElementType

func (RepositoryPolicyArrayOutput) Index

func (RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutput

func (o RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutput() RepositoryPolicyArrayOutput

func (RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutputWithContext

func (o RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutputWithContext(ctx context.Context) RepositoryPolicyArrayOutput

type RepositoryPolicyInput

type RepositoryPolicyInput interface {
	pulumi.Input

	ToRepositoryPolicyOutput() RepositoryPolicyOutput
	ToRepositoryPolicyOutputWithContext(ctx context.Context) RepositoryPolicyOutput
}

type RepositoryPolicyMap

type RepositoryPolicyMap map[string]RepositoryPolicyInput

func (RepositoryPolicyMap) ElementType

func (RepositoryPolicyMap) ElementType() reflect.Type

func (RepositoryPolicyMap) ToRepositoryPolicyMapOutput

func (i RepositoryPolicyMap) ToRepositoryPolicyMapOutput() RepositoryPolicyMapOutput

func (RepositoryPolicyMap) ToRepositoryPolicyMapOutputWithContext

func (i RepositoryPolicyMap) ToRepositoryPolicyMapOutputWithContext(ctx context.Context) RepositoryPolicyMapOutput

type RepositoryPolicyMapInput

type RepositoryPolicyMapInput interface {
	pulumi.Input

	ToRepositoryPolicyMapOutput() RepositoryPolicyMapOutput
	ToRepositoryPolicyMapOutputWithContext(context.Context) RepositoryPolicyMapOutput
}

RepositoryPolicyMapInput is an input type that accepts RepositoryPolicyMap and RepositoryPolicyMapOutput values. You can construct a concrete instance of `RepositoryPolicyMapInput` via:

RepositoryPolicyMap{ "key": RepositoryPolicyArgs{...} }

type RepositoryPolicyMapOutput

type RepositoryPolicyMapOutput struct{ *pulumi.OutputState }

func (RepositoryPolicyMapOutput) ElementType

func (RepositoryPolicyMapOutput) ElementType() reflect.Type

func (RepositoryPolicyMapOutput) MapIndex

func (RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutput

func (o RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutput() RepositoryPolicyMapOutput

func (RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutputWithContext

func (o RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutputWithContext(ctx context.Context) RepositoryPolicyMapOutput

type RepositoryPolicyOutput

type RepositoryPolicyOutput struct {
	*pulumi.OutputState
}

func (RepositoryPolicyOutput) ElementType

func (RepositoryPolicyOutput) ElementType() reflect.Type

func (RepositoryPolicyOutput) ToRepositoryPolicyOutput

func (o RepositoryPolicyOutput) ToRepositoryPolicyOutput() RepositoryPolicyOutput

func (RepositoryPolicyOutput) ToRepositoryPolicyOutputWithContext

func (o RepositoryPolicyOutput) ToRepositoryPolicyOutputWithContext(ctx context.Context) RepositoryPolicyOutput

func (RepositoryPolicyOutput) ToRepositoryPolicyPtrOutput

func (o RepositoryPolicyOutput) ToRepositoryPolicyPtrOutput() RepositoryPolicyPtrOutput

func (RepositoryPolicyOutput) ToRepositoryPolicyPtrOutputWithContext

func (o RepositoryPolicyOutput) ToRepositoryPolicyPtrOutputWithContext(ctx context.Context) RepositoryPolicyPtrOutput

type RepositoryPolicyPtrInput

type RepositoryPolicyPtrInput interface {
	pulumi.Input

	ToRepositoryPolicyPtrOutput() RepositoryPolicyPtrOutput
	ToRepositoryPolicyPtrOutputWithContext(ctx context.Context) RepositoryPolicyPtrOutput
}

type RepositoryPolicyPtrOutput

type RepositoryPolicyPtrOutput struct {
	*pulumi.OutputState
}

func (RepositoryPolicyPtrOutput) ElementType

func (RepositoryPolicyPtrOutput) ElementType() reflect.Type

func (RepositoryPolicyPtrOutput) ToRepositoryPolicyPtrOutput

func (o RepositoryPolicyPtrOutput) ToRepositoryPolicyPtrOutput() RepositoryPolicyPtrOutput

func (RepositoryPolicyPtrOutput) ToRepositoryPolicyPtrOutputWithContext

func (o RepositoryPolicyPtrOutput) ToRepositoryPolicyPtrOutputWithContext(ctx context.Context) RepositoryPolicyPtrOutput

type RepositoryPolicyState

type RepositoryPolicyState struct {
	// The policy document. This is a JSON formatted string.
	Policy pulumi.StringPtrInput
	// The registry ID where the repository was created.
	RegistryId pulumi.StringPtrInput
	// Name of the repository to apply the policy.
	Repository pulumi.StringPtrInput
}

func (RepositoryPolicyState) ElementType

func (RepositoryPolicyState) ElementType() reflect.Type

type RepositoryPtrInput

type RepositoryPtrInput interface {
	pulumi.Input

	ToRepositoryPtrOutput() RepositoryPtrOutput
	ToRepositoryPtrOutputWithContext(ctx context.Context) RepositoryPtrOutput
}

type RepositoryPtrOutput

type RepositoryPtrOutput struct {
	*pulumi.OutputState
}

func (RepositoryPtrOutput) ElementType

func (RepositoryPtrOutput) ElementType() reflect.Type

func (RepositoryPtrOutput) ToRepositoryPtrOutput

func (o RepositoryPtrOutput) ToRepositoryPtrOutput() RepositoryPtrOutput

func (RepositoryPtrOutput) ToRepositoryPtrOutputWithContext

func (o RepositoryPtrOutput) ToRepositoryPtrOutputWithContext(ctx context.Context) RepositoryPtrOutput

type RepositoryState

type RepositoryState struct {
	// Full ARN of the repository.
	Arn pulumi.StringPtrInput
	// Encryption configuration for the repository. See below for schema.
	EncryptionConfigurations RepositoryEncryptionConfigurationArrayInput
	// Configuration block that defines image scanning configuration for the repository. By default, image scanning must be manually triggered. See the [ECR User Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html) for more information about image scanning.
	ImageScanningConfiguration RepositoryImageScanningConfigurationPtrInput
	// The tag mutability setting for the repository. Must be one of: `MUTABLE` or `IMMUTABLE`. Defaults to `MUTABLE`.
	ImageTagMutability pulumi.StringPtrInput
	// Name of the repository.
	Name pulumi.StringPtrInput
	// The registry ID where the repository was created.
	RegistryId pulumi.StringPtrInput
	// The URL of the repository (in the form `aws_account_id.dkr.ecr.region.amazonaws.com/repositoryName`).
	RepositoryUrl pulumi.StringPtrInput
	// A map of tags to assign to the resource.
	Tags pulumi.StringMapInput
}

func (RepositoryState) ElementType

func (RepositoryState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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