ecrpublic

package
v6.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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"`
	// 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"`
	// 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, opts ...pulumi.InvokeOption) (*GetAuthorizationTokenResult, error)

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

> **NOTE:** This data source can only be used in the `us-east-1` region.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecrpublic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

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

```

type GetAuthorizationTokenResultOutput added in v6.6.1

type GetAuthorizationTokenResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getAuthorizationToken.

func GetAuthorizationTokenOutput added in v6.6.1

func GetAuthorizationTokenOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetAuthorizationTokenResultOutput

func (GetAuthorizationTokenResultOutput) AuthorizationToken added in v6.6.1

func (o GetAuthorizationTokenResultOutput) AuthorizationToken() pulumi.StringOutput

Temporary IAM authentication credentials to access the ECR repository encoded in base64 in the form of `user_name:password`.

func (GetAuthorizationTokenResultOutput) ElementType added in v6.6.1

func (GetAuthorizationTokenResultOutput) ExpiresAt added in v6.6.1

Time in UTC RFC3339 format when the authorization token expires.

func (GetAuthorizationTokenResultOutput) Id added in v6.6.1

The provider-assigned unique ID for this managed resource.

func (GetAuthorizationTokenResultOutput) Password added in v6.6.1

Password decoded from the authorization token.

func (GetAuthorizationTokenResultOutput) ToGetAuthorizationTokenResultOutput added in v6.6.1

func (o GetAuthorizationTokenResultOutput) ToGetAuthorizationTokenResultOutput() GetAuthorizationTokenResultOutput

func (GetAuthorizationTokenResultOutput) ToGetAuthorizationTokenResultOutputWithContext added in v6.6.1

func (o GetAuthorizationTokenResultOutput) ToGetAuthorizationTokenResultOutputWithContext(ctx context.Context) GetAuthorizationTokenResultOutput

func (GetAuthorizationTokenResultOutput) ToOutput added in v6.6.1

func (GetAuthorizationTokenResultOutput) UserName added in v6.6.1

User name decoded from the authorization token.

type Repository

type Repository struct {
	pulumi.CustomResourceState

	// Full ARN of the repository.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// Catalog data configuration for the repository. See below for schema.
	CatalogData  RepositoryCatalogDataPtrOutput `pulumi:"catalogData"`
	ForceDestroy pulumi.BoolPtrOutput           `pulumi:"forceDestroy"`
	// The registry ID where the repository was created.
	RegistryId pulumi.StringOutput `pulumi:"registryId"`
	// Name of the repository.
	RepositoryName pulumi.StringOutput `pulumi:"repositoryName"`
	// The URI of the repository.
	RepositoryUri pulumi.StringOutput `pulumi:"repositoryUri"`
	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	//
	// Deprecated: Please use `tags` instead.
	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}

Provides a Public Elastic Container Registry Repository.

> **NOTE:** This resource can only be used in the `us-east-1` region.

## Example Usage

```go package main

import (

"encoding/base64"
"os"

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecrpublic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func filebase64OrPanic(path string) pulumi.StringPtrInput {
	if fileData, err := os.ReadFile(path); err == nil {
		return pulumi.String(base64.StdEncoding.EncodeToString(fileData[:]))
	} else {
		panic(err.Error())
	}
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aws.NewProvider(ctx, "usEast1", &aws.ProviderArgs{
			Region: pulumi.String("us-east-1"),
		})
		if err != nil {
			return err
		}
		_, err = ecrpublic.NewRepository(ctx, "foo", &ecrpublic.RepositoryArgs{
			RepositoryName: pulumi.String("bar"),
			CatalogData: &ecrpublic.RepositoryCatalogDataArgs{
				AboutText: pulumi.String("About Text"),
				Architectures: pulumi.StringArray{
					pulumi.String("ARM"),
				},
				Description:   pulumi.String("Description"),
				LogoImageBlob: filebase64OrPanic(image.Png),
				OperatingSystems: pulumi.StringArray{
					pulumi.String("Linux"),
				},
				UsageText: pulumi.String("Usage Text"),
			},
			Tags: pulumi.StringMap{
				"env": pulumi.String("production"),
			},
		}, pulumi.Provider(aws.Us_east_1))
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Using `pulumi import`, import ECR Public Repositories using the `repository_name`. For example:

```sh

$ pulumi import aws:ecrpublic/repository:Repository example example

```

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) ToOutput added in v6.1.0

func (i *Repository) ToOutput(ctx context.Context) pulumix.Output[*Repository]

func (*Repository) ToRepositoryOutput

func (i *Repository) ToRepositoryOutput() RepositoryOutput

func (*Repository) ToRepositoryOutputWithContext

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

type RepositoryArgs

type RepositoryArgs struct {
	// Catalog data configuration for the repository. See below for schema.
	CatalogData  RepositoryCatalogDataPtrInput
	ForceDestroy pulumi.BoolPtrInput
	// Name of the repository.
	RepositoryName pulumi.StringInput
	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	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) ToOutput added in v6.1.0

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) ToOutput added in v6.1.0

func (RepositoryArrayOutput) ToRepositoryArrayOutput

func (o RepositoryArrayOutput) ToRepositoryArrayOutput() RepositoryArrayOutput

func (RepositoryArrayOutput) ToRepositoryArrayOutputWithContext

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

type RepositoryCatalogData

type RepositoryCatalogData struct {
	// A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
	AboutText *string `pulumi:"aboutText"`
	// The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters: `ARM`, `ARM 64`, `x86`, `x86-64`
	Architectures []string `pulumi:"architectures"`
	// A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.
	Description *string `pulumi:"description"`
	// The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.
	LogoImageBlob *string `pulumi:"logoImageBlob"`
	// The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters: `Linux`, `Windows`
	OperatingSystems []string `pulumi:"operatingSystems"`
	// Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.
	UsageText *string `pulumi:"usageText"`
}

type RepositoryCatalogDataArgs

type RepositoryCatalogDataArgs struct {
	// A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
	AboutText pulumi.StringPtrInput `pulumi:"aboutText"`
	// The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters: `ARM`, `ARM 64`, `x86`, `x86-64`
	Architectures pulumi.StringArrayInput `pulumi:"architectures"`
	// A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.
	Description pulumi.StringPtrInput `pulumi:"description"`
	// The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.
	LogoImageBlob pulumi.StringPtrInput `pulumi:"logoImageBlob"`
	// The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters: `Linux`, `Windows`
	OperatingSystems pulumi.StringArrayInput `pulumi:"operatingSystems"`
	// Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.
	UsageText pulumi.StringPtrInput `pulumi:"usageText"`
}

func (RepositoryCatalogDataArgs) ElementType

func (RepositoryCatalogDataArgs) ElementType() reflect.Type

func (RepositoryCatalogDataArgs) ToOutput added in v6.1.0

func (RepositoryCatalogDataArgs) ToRepositoryCatalogDataOutput

func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataOutput() RepositoryCatalogDataOutput

func (RepositoryCatalogDataArgs) ToRepositoryCatalogDataOutputWithContext

func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataOutputWithContext(ctx context.Context) RepositoryCatalogDataOutput

func (RepositoryCatalogDataArgs) ToRepositoryCatalogDataPtrOutput

func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput

func (RepositoryCatalogDataArgs) ToRepositoryCatalogDataPtrOutputWithContext

func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput

type RepositoryCatalogDataInput

type RepositoryCatalogDataInput interface {
	pulumi.Input

	ToRepositoryCatalogDataOutput() RepositoryCatalogDataOutput
	ToRepositoryCatalogDataOutputWithContext(context.Context) RepositoryCatalogDataOutput
}

RepositoryCatalogDataInput is an input type that accepts RepositoryCatalogDataArgs and RepositoryCatalogDataOutput values. You can construct a concrete instance of `RepositoryCatalogDataInput` via:

RepositoryCatalogDataArgs{...}

type RepositoryCatalogDataOutput

type RepositoryCatalogDataOutput struct{ *pulumi.OutputState }

func (RepositoryCatalogDataOutput) AboutText

A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.

func (RepositoryCatalogDataOutput) Architectures

The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters: `ARM`, `ARM 64`, `x86`, `x86-64`

func (RepositoryCatalogDataOutput) Description

A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.

func (RepositoryCatalogDataOutput) ElementType

func (RepositoryCatalogDataOutput) LogoImageBlob

The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.

func (RepositoryCatalogDataOutput) OperatingSystems

The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters: `Linux`, `Windows`

func (RepositoryCatalogDataOutput) ToOutput added in v6.1.0

func (RepositoryCatalogDataOutput) ToRepositoryCatalogDataOutput

func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataOutput() RepositoryCatalogDataOutput

func (RepositoryCatalogDataOutput) ToRepositoryCatalogDataOutputWithContext

func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataOutputWithContext(ctx context.Context) RepositoryCatalogDataOutput

func (RepositoryCatalogDataOutput) ToRepositoryCatalogDataPtrOutput

func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput

func (RepositoryCatalogDataOutput) ToRepositoryCatalogDataPtrOutputWithContext

func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput

func (RepositoryCatalogDataOutput) UsageText

Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.

type RepositoryCatalogDataPtrInput

type RepositoryCatalogDataPtrInput interface {
	pulumi.Input

	ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput
	ToRepositoryCatalogDataPtrOutputWithContext(context.Context) RepositoryCatalogDataPtrOutput
}

RepositoryCatalogDataPtrInput is an input type that accepts RepositoryCatalogDataArgs, RepositoryCatalogDataPtr and RepositoryCatalogDataPtrOutput values. You can construct a concrete instance of `RepositoryCatalogDataPtrInput` via:

        RepositoryCatalogDataArgs{...}

or:

        nil

type RepositoryCatalogDataPtrOutput

type RepositoryCatalogDataPtrOutput struct{ *pulumi.OutputState }

func (RepositoryCatalogDataPtrOutput) AboutText

A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.

func (RepositoryCatalogDataPtrOutput) Architectures

The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters: `ARM`, `ARM 64`, `x86`, `x86-64`

func (RepositoryCatalogDataPtrOutput) Description

A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.

func (RepositoryCatalogDataPtrOutput) Elem

func (RepositoryCatalogDataPtrOutput) ElementType

func (RepositoryCatalogDataPtrOutput) LogoImageBlob

The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.

func (RepositoryCatalogDataPtrOutput) OperatingSystems

The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters: `Linux`, `Windows`

func (RepositoryCatalogDataPtrOutput) ToOutput added in v6.1.0

func (RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutput

func (o RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput

func (RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutputWithContext

func (o RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput

func (RepositoryCatalogDataPtrOutput) UsageText

Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.

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) ToOutput added in v6.1.0

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) ToOutput added in v6.1.0

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) Arn

Full ARN of the repository.

func (RepositoryOutput) CatalogData

Catalog data configuration for the repository. See below for schema.

func (RepositoryOutput) ElementType

func (RepositoryOutput) ElementType() reflect.Type

func (RepositoryOutput) ForceDestroy

func (o RepositoryOutput) ForceDestroy() pulumi.BoolPtrOutput

func (RepositoryOutput) RegistryId

func (o RepositoryOutput) RegistryId() pulumi.StringOutput

The registry ID where the repository was created.

func (RepositoryOutput) RepositoryName

func (o RepositoryOutput) RepositoryName() pulumi.StringOutput

Name of the repository.

func (RepositoryOutput) RepositoryUri

func (o RepositoryOutput) RepositoryUri() pulumi.StringOutput

The URI of the repository.

func (RepositoryOutput) Tags

Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.

func (RepositoryOutput) TagsAll deprecated

Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.

Deprecated: Please use `tags` instead.

func (RepositoryOutput) ToOutput added in v6.1.0

func (RepositoryOutput) ToRepositoryOutput

func (o RepositoryOutput) ToRepositoryOutput() RepositoryOutput

func (RepositoryOutput) ToRepositoryOutputWithContext

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

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.
	RepositoryName pulumi.StringOutput `pulumi:"repositoryName"`
}

Provides an Elastic Container Registry Public Repository Policy.

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

> **NOTE:** This resource can only be used in the `us-east-1` region.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecrpublic"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleRepository, err := ecrpublic.NewRepository(ctx, "exampleRepository", &ecrpublic.RepositoryArgs{
			RepositoryName: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		examplePolicyDocument, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
			Statements: []iam.GetPolicyDocumentStatement{
				{
					Sid:    pulumi.StringRef("new policy"),
					Effect: pulumi.StringRef("Allow"),
					Principals: []iam.GetPolicyDocumentStatementPrincipal{
						{
							Type: "AWS",
							Identifiers: []string{
								"123456789012",
							},
						},
					},
					Actions: []string{
						"ecr:GetDownloadUrlForLayer",
						"ecr:BatchGetImage",
						"ecr:BatchCheckLayerAvailability",
						"ecr:PutImage",
						"ecr:InitiateLayerUpload",
						"ecr:UploadLayerPart",
						"ecr:CompleteLayerUpload",
						"ecr:DescribeRepositories",
						"ecr:GetRepositoryPolicy",
						"ecr:ListImages",
						"ecr:DeleteRepository",
						"ecr:BatchDeleteImage",
						"ecr:SetRepositoryPolicy",
						"ecr:DeleteRepositoryPolicy",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = ecrpublic.NewRepositoryPolicy(ctx, "exampleRepositoryPolicy", &ecrpublic.RepositoryPolicyArgs{
			RepositoryName: exampleRepository.RepositoryName,
			Policy:         *pulumi.String(examplePolicyDocument.Json),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Using `pulumi import`, import ECR Public Repository Policy using the repository name. For example:

```sh

$ pulumi import aws:ecrpublic/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) ToOutput added in v6.1.0

func (*RepositoryPolicy) ToRepositoryPolicyOutput

func (i *RepositoryPolicy) ToRepositoryPolicyOutput() RepositoryPolicyOutput

func (*RepositoryPolicy) ToRepositoryPolicyOutputWithContext

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

type RepositoryPolicyArgs

type RepositoryPolicyArgs struct {
	// The policy document. This is a JSON formatted string.
	Policy pulumi.StringInput
	// Name of the repository to apply the policy.
	RepositoryName 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) ToOutput added in v6.1.0

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) ToOutput added in v6.1.0

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) ToOutput added in v6.1.0

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) ToOutput added in v6.1.0

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) Policy

The policy document. This is a JSON formatted string.

func (RepositoryPolicyOutput) RegistryId

The registry ID where the repository was created.

func (RepositoryPolicyOutput) RepositoryName

func (o RepositoryPolicyOutput) RepositoryName() pulumi.StringOutput

Name of the repository to apply the policy.

func (RepositoryPolicyOutput) ToOutput added in v6.1.0

func (RepositoryPolicyOutput) ToRepositoryPolicyOutput

func (o RepositoryPolicyOutput) ToRepositoryPolicyOutput() RepositoryPolicyOutput

func (RepositoryPolicyOutput) ToRepositoryPolicyOutputWithContext

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

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.
	RepositoryName pulumi.StringPtrInput
}

func (RepositoryPolicyState) ElementType

func (RepositoryPolicyState) ElementType() reflect.Type

type RepositoryState

type RepositoryState struct {
	// Full ARN of the repository.
	Arn pulumi.StringPtrInput
	// Catalog data configuration for the repository. See below for schema.
	CatalogData  RepositoryCatalogDataPtrInput
	ForceDestroy pulumi.BoolPtrInput
	// The registry ID where the repository was created.
	RegistryId pulumi.StringPtrInput
	// Name of the repository.
	RepositoryName pulumi.StringPtrInput
	// The URI of the repository.
	RepositoryUri pulumi.StringPtrInput
	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
	Tags pulumi.StringMapInput
	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
	//
	// Deprecated: Please use `tags` instead.
	TagsAll 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