Documentation ¶
Index ¶
- type Repository
- type RepositoryArgs
- type RepositoryArray
- type RepositoryArrayInput
- type RepositoryArrayOutput
- func (RepositoryArrayOutput) ElementType() reflect.Type
- func (o RepositoryArrayOutput) Index(i pulumi.IntInput) RepositoryOutput
- func (o RepositoryArrayOutput) ToRepositoryArrayOutput() RepositoryArrayOutput
- func (o RepositoryArrayOutput) ToRepositoryArrayOutputWithContext(ctx context.Context) RepositoryArrayOutput
- type RepositoryCatalogData
- type RepositoryCatalogDataArgs
- func (RepositoryCatalogDataArgs) ElementType() reflect.Type
- func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataOutput() RepositoryCatalogDataOutput
- func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataOutputWithContext(ctx context.Context) RepositoryCatalogDataOutput
- func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput
- func (i RepositoryCatalogDataArgs) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput
- type RepositoryCatalogDataInput
- type RepositoryCatalogDataOutput
- func (o RepositoryCatalogDataOutput) AboutText() pulumi.StringPtrOutput
- func (o RepositoryCatalogDataOutput) Architectures() pulumi.StringArrayOutput
- func (o RepositoryCatalogDataOutput) Description() pulumi.StringPtrOutput
- func (RepositoryCatalogDataOutput) ElementType() reflect.Type
- func (o RepositoryCatalogDataOutput) LogoImageBlob() pulumi.StringPtrOutput
- func (o RepositoryCatalogDataOutput) OperatingSystems() pulumi.StringArrayOutput
- func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataOutput() RepositoryCatalogDataOutput
- func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataOutputWithContext(ctx context.Context) RepositoryCatalogDataOutput
- func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput
- func (o RepositoryCatalogDataOutput) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput
- func (o RepositoryCatalogDataOutput) UsageText() pulumi.StringPtrOutput
- type RepositoryCatalogDataPtrInput
- type RepositoryCatalogDataPtrOutput
- func (o RepositoryCatalogDataPtrOutput) AboutText() pulumi.StringPtrOutput
- func (o RepositoryCatalogDataPtrOutput) Architectures() pulumi.StringArrayOutput
- func (o RepositoryCatalogDataPtrOutput) Description() pulumi.StringPtrOutput
- func (o RepositoryCatalogDataPtrOutput) Elem() RepositoryCatalogDataOutput
- func (RepositoryCatalogDataPtrOutput) ElementType() reflect.Type
- func (o RepositoryCatalogDataPtrOutput) LogoImageBlob() pulumi.StringPtrOutput
- func (o RepositoryCatalogDataPtrOutput) OperatingSystems() pulumi.StringArrayOutput
- func (o RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput
- func (o RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput
- func (o RepositoryCatalogDataPtrOutput) UsageText() pulumi.StringPtrOutput
- type RepositoryInput
- type RepositoryMap
- type RepositoryMapInput
- type RepositoryMapOutput
- func (RepositoryMapOutput) ElementType() reflect.Type
- func (o RepositoryMapOutput) MapIndex(k pulumi.StringInput) RepositoryOutput
- func (o RepositoryMapOutput) ToRepositoryMapOutput() RepositoryMapOutput
- func (o RepositoryMapOutput) ToRepositoryMapOutputWithContext(ctx context.Context) RepositoryMapOutput
- type RepositoryOutput
- type RepositoryPolicy
- type RepositoryPolicyArgs
- type RepositoryPolicyArray
- type RepositoryPolicyArrayInput
- type RepositoryPolicyArrayOutput
- func (RepositoryPolicyArrayOutput) ElementType() reflect.Type
- func (o RepositoryPolicyArrayOutput) Index(i pulumi.IntInput) RepositoryPolicyOutput
- func (o RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutput() RepositoryPolicyArrayOutput
- func (o RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutputWithContext(ctx context.Context) RepositoryPolicyArrayOutput
- type RepositoryPolicyInput
- type RepositoryPolicyMap
- type RepositoryPolicyMapInput
- type RepositoryPolicyMapOutput
- func (RepositoryPolicyMapOutput) ElementType() reflect.Type
- func (o RepositoryPolicyMapOutput) MapIndex(k pulumi.StringInput) RepositoryPolicyOutput
- func (o RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutput() RepositoryPolicyMapOutput
- func (o RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutputWithContext(ctx context.Context) RepositoryPolicyMapOutput
- type RepositoryPolicyOutput
- type RepositoryPolicyState
- type RepositoryState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"` }
Provides a Public Elastic Container Registry Repository.
> **NOTE:** This resource can only be used with `us-east-1` region.
## Example Usage
```go package main
import (
"encoding/base64" "io/ioutil" "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecrpublic" "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/providers" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func filebase64OrPanic(path string) pulumi.StringPtrInput { if fileData, err := ioutil.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 := providers.Newaws(ctx, "usEast1", &providers.awsArgs{ Region: "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"), }, }, pulumi.Provider(aws.Us_east_1)) if err != nil { return err } return nil }) }
```
## Import
ECR Public Repositories can be imported using the `repository_name`, e.g.,
```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) 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 }
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 (o RepositoryArrayOutput) Index(i pulumi.IntInput) RepositoryOutput
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) 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 ¶
func (o RepositoryCatalogDataOutput) AboutText() pulumi.StringPtrOutput
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 ¶
func (o RepositoryCatalogDataOutput) Architectures() pulumi.StringArrayOutput
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 ¶
func (o RepositoryCatalogDataOutput) Description() pulumi.StringPtrOutput
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) ElementType() reflect.Type
func (RepositoryCatalogDataOutput) LogoImageBlob ¶
func (o RepositoryCatalogDataOutput) LogoImageBlob() pulumi.StringPtrOutput
The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.
func (RepositoryCatalogDataOutput) OperatingSystems ¶
func (o RepositoryCatalogDataOutput) OperatingSystems() pulumi.StringArrayOutput
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) 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 ¶
func (o RepositoryCatalogDataOutput) UsageText() pulumi.StringPtrOutput
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
func RepositoryCatalogDataPtr ¶
func RepositoryCatalogDataPtr(v *RepositoryCatalogDataArgs) RepositoryCatalogDataPtrInput
type RepositoryCatalogDataPtrOutput ¶
type RepositoryCatalogDataPtrOutput struct{ *pulumi.OutputState }
func (RepositoryCatalogDataPtrOutput) AboutText ¶
func (o RepositoryCatalogDataPtrOutput) AboutText() pulumi.StringPtrOutput
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 ¶
func (o RepositoryCatalogDataPtrOutput) Architectures() pulumi.StringArrayOutput
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 ¶
func (o RepositoryCatalogDataPtrOutput) Description() pulumi.StringPtrOutput
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 (o RepositoryCatalogDataPtrOutput) Elem() RepositoryCatalogDataOutput
func (RepositoryCatalogDataPtrOutput) ElementType ¶
func (RepositoryCatalogDataPtrOutput) ElementType() reflect.Type
func (RepositoryCatalogDataPtrOutput) LogoImageBlob ¶
func (o RepositoryCatalogDataPtrOutput) LogoImageBlob() pulumi.StringPtrOutput
The base64-encoded repository logo payload. (Only visible for verified accounts) Note that drift detection is disabled for this attribute.
func (RepositoryCatalogDataPtrOutput) OperatingSystems ¶
func (o RepositoryCatalogDataPtrOutput) OperatingSystems() pulumi.StringArrayOutput
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) ToRepositoryCatalogDataPtrOutput ¶
func (o RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutput() RepositoryCatalogDataPtrOutput
func (RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutputWithContext ¶
func (o RepositoryCatalogDataPtrOutput) ToRepositoryCatalogDataPtrOutputWithContext(ctx context.Context) RepositoryCatalogDataPtrOutput
func (RepositoryCatalogDataPtrOutput) UsageText ¶
func (o RepositoryCatalogDataPtrOutput) UsageText() pulumi.StringPtrOutput
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) 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 (o RepositoryMapOutput) MapIndex(k pulumi.StringInput) RepositoryOutput
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
type RepositoryPolicy ¶ added in v4.33.0
type RepositoryPolicy struct { pulumi.CustomResourceState 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 with `us-east-1` region.
## Example Usage
```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ecrpublic" "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 } _, err = ecrpublic.NewRepositoryPolicy(ctx, "exampleRepositoryPolicy", &ecrpublic.RepositoryPolicyArgs{ RepositoryName: exampleRepository.RepositoryName, 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 Public Repository Policy can be imported using the repository name, e.g.
```sh
$ pulumi import aws:ecrpublic/repositoryPolicy:RepositoryPolicy example example
```
func GetRepositoryPolicy ¶ added in v4.33.0
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 ¶ added in v4.33.0
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 ¶ added in v4.33.0
func (*RepositoryPolicy) ElementType() reflect.Type
func (*RepositoryPolicy) ToRepositoryPolicyOutput ¶ added in v4.33.0
func (i *RepositoryPolicy) ToRepositoryPolicyOutput() RepositoryPolicyOutput
func (*RepositoryPolicy) ToRepositoryPolicyOutputWithContext ¶ added in v4.33.0
func (i *RepositoryPolicy) ToRepositoryPolicyOutputWithContext(ctx context.Context) RepositoryPolicyOutput
type RepositoryPolicyArgs ¶ added in v4.33.0
type RepositoryPolicyArgs struct { 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 ¶ added in v4.33.0
func (RepositoryPolicyArgs) ElementType() reflect.Type
type RepositoryPolicyArray ¶ added in v4.33.0
type RepositoryPolicyArray []RepositoryPolicyInput
func (RepositoryPolicyArray) ElementType ¶ added in v4.33.0
func (RepositoryPolicyArray) ElementType() reflect.Type
func (RepositoryPolicyArray) ToRepositoryPolicyArrayOutput ¶ added in v4.33.0
func (i RepositoryPolicyArray) ToRepositoryPolicyArrayOutput() RepositoryPolicyArrayOutput
func (RepositoryPolicyArray) ToRepositoryPolicyArrayOutputWithContext ¶ added in v4.33.0
func (i RepositoryPolicyArray) ToRepositoryPolicyArrayOutputWithContext(ctx context.Context) RepositoryPolicyArrayOutput
type RepositoryPolicyArrayInput ¶ added in v4.33.0
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 ¶ added in v4.33.0
type RepositoryPolicyArrayOutput struct{ *pulumi.OutputState }
func (RepositoryPolicyArrayOutput) ElementType ¶ added in v4.33.0
func (RepositoryPolicyArrayOutput) ElementType() reflect.Type
func (RepositoryPolicyArrayOutput) Index ¶ added in v4.33.0
func (o RepositoryPolicyArrayOutput) Index(i pulumi.IntInput) RepositoryPolicyOutput
func (RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutput ¶ added in v4.33.0
func (o RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutput() RepositoryPolicyArrayOutput
func (RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutputWithContext ¶ added in v4.33.0
func (o RepositoryPolicyArrayOutput) ToRepositoryPolicyArrayOutputWithContext(ctx context.Context) RepositoryPolicyArrayOutput
type RepositoryPolicyInput ¶ added in v4.33.0
type RepositoryPolicyInput interface { pulumi.Input ToRepositoryPolicyOutput() RepositoryPolicyOutput ToRepositoryPolicyOutputWithContext(ctx context.Context) RepositoryPolicyOutput }
type RepositoryPolicyMap ¶ added in v4.33.0
type RepositoryPolicyMap map[string]RepositoryPolicyInput
func (RepositoryPolicyMap) ElementType ¶ added in v4.33.0
func (RepositoryPolicyMap) ElementType() reflect.Type
func (RepositoryPolicyMap) ToRepositoryPolicyMapOutput ¶ added in v4.33.0
func (i RepositoryPolicyMap) ToRepositoryPolicyMapOutput() RepositoryPolicyMapOutput
func (RepositoryPolicyMap) ToRepositoryPolicyMapOutputWithContext ¶ added in v4.33.0
func (i RepositoryPolicyMap) ToRepositoryPolicyMapOutputWithContext(ctx context.Context) RepositoryPolicyMapOutput
type RepositoryPolicyMapInput ¶ added in v4.33.0
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 ¶ added in v4.33.0
type RepositoryPolicyMapOutput struct{ *pulumi.OutputState }
func (RepositoryPolicyMapOutput) ElementType ¶ added in v4.33.0
func (RepositoryPolicyMapOutput) ElementType() reflect.Type
func (RepositoryPolicyMapOutput) MapIndex ¶ added in v4.33.0
func (o RepositoryPolicyMapOutput) MapIndex(k pulumi.StringInput) RepositoryPolicyOutput
func (RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutput ¶ added in v4.33.0
func (o RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutput() RepositoryPolicyMapOutput
func (RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutputWithContext ¶ added in v4.33.0
func (o RepositoryPolicyMapOutput) ToRepositoryPolicyMapOutputWithContext(ctx context.Context) RepositoryPolicyMapOutput
type RepositoryPolicyOutput ¶ added in v4.33.0
type RepositoryPolicyOutput struct{ *pulumi.OutputState }
func (RepositoryPolicyOutput) ElementType ¶ added in v4.33.0
func (RepositoryPolicyOutput) ElementType() reflect.Type
func (RepositoryPolicyOutput) ToRepositoryPolicyOutput ¶ added in v4.33.0
func (o RepositoryPolicyOutput) ToRepositoryPolicyOutput() RepositoryPolicyOutput
func (RepositoryPolicyOutput) ToRepositoryPolicyOutputWithContext ¶ added in v4.33.0
func (o RepositoryPolicyOutput) ToRepositoryPolicyOutputWithContext(ctx context.Context) RepositoryPolicyOutput
type RepositoryPolicyState ¶ added in v4.33.0
type RepositoryPolicyState struct { 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 ¶ added in v4.33.0
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 }
func (RepositoryState) ElementType ¶
func (RepositoryState) ElementType() reflect.Type