Skip to content

Commit

Permalink
Generate SDK updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ferguscan authored and mjeffryes committed Mar 25, 2024
1 parent eaf78bd commit ab733bb
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 0 deletions.
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,10 @@
"type": "string",
"description": "The architecture of the platform you want to build this image for, e.g. `linux/arm64`."
},
"registryId": {
"type": "string",
"description": "ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)"
},
"repositoryUrl": {
"type": "string",
"description": "Url of the repository"
Expand Down
6 changes: 6 additions & 0 deletions schemagen/pkg/gen/ecr.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ func ecrImage(awsSpec schema.PackageSpec, dockerSpec schema.PackageSpec) schema.
Type: "string",
},
}
inputs["registryId"] = schema.PropertySpec{
Description: "ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)",
TypeSpec: schema.TypeSpec{
Type: "string",
},
}
return schema.ResourceSpec{
IsComponent: true,
InputProperties: inputs,
Expand Down
6 changes: 6 additions & 0 deletions sdk/dotnet/Ecr/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ public InputList<string> CacheFrom
[Input("platform")]
public Input<string>? Platform { get; set; }

/// <summary>
/// ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
/// </summary>
[Input("registryId")]
public Input<string>? RegistryId { get; set; }

/// <summary>
/// Url of the repository
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions sdk/go/awsx/ecr/image.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions sdk/java/src/main/java/com/pulumi/awsx/ecr/ImageArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,21 @@ public Optional<Output<String>> platform() {
return Optional.ofNullable(this.platform);
}

/**
* ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
*
*/
@Import(name="registryId")
private @Nullable Output<String> registryId;

/**
* @return ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
*
*/
public Optional<Output<String>> registryId() {
return Optional.ofNullable(this.registryId);
}

/**
* Url of the repository
*
Expand Down Expand Up @@ -163,6 +178,7 @@ private ImageArgs(ImageArgs $) {
this.dockerfile = $.dockerfile;
this.imageTag = $.imageTag;
this.platform = $.platform;
this.registryId = $.registryId;
this.repositoryUrl = $.repositoryUrl;
this.target = $.target;
}
Expand Down Expand Up @@ -332,6 +348,27 @@ public Builder platform(String platform) {
return platform(Output.of(platform));
}

/**
* @param registryId ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
*
* @return builder
*
*/
public Builder registryId(@Nullable Output<String> registryId) {
$.registryId = registryId;
return this;
}

/**
* @param registryId ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
*
* @return builder
*
*/
public Builder registryId(String registryId) {
return registryId(Output.of(registryId));
}

/**
* @param repositoryUrl Url of the repository
*
Expand Down
5 changes: 5 additions & 0 deletions sdk/nodejs/ecr/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class Image extends pulumi.ComponentResource {
resourceInputs["dockerfile"] = args ? args.dockerfile : undefined;
resourceInputs["imageTag"] = args ? args.imageTag : undefined;
resourceInputs["platform"] = args ? args.platform : undefined;
resourceInputs["registryId"] = args ? args.registryId : undefined;
resourceInputs["repositoryUrl"] = args ? args.repositoryUrl : undefined;
resourceInputs["target"] = args ? args.target : undefined;
resourceInputs["imageUri"] = undefined /*out*/;
Expand Down Expand Up @@ -94,6 +95,10 @@ export interface ImageArgs {
* The architecture of the platform you want to build this image for, e.g. `linux/arm64`.
*/
platform?: pulumi.Input<string>;
/**
* ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
*/
registryId?: pulumi.Input<string>;
/**
* Url of the repository
*/
Expand Down
20 changes: 20 additions & 0 deletions sdk/python/pulumi_awsx/ecr/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(__self__, *,
dockerfile: Optional[pulumi.Input[str]] = None,
image_tag: Optional[pulumi.Input[str]] = None,
platform: Optional[pulumi.Input[str]] = None,
registry_id: Optional[pulumi.Input[str]] = None,
target: Optional[pulumi.Input[str]] = None):
"""
The set of arguments for constructing a Image resource.
Expand All @@ -34,6 +35,7 @@ def __init__(__self__, *,
:param pulumi.Input[str] dockerfile: dockerfile may be used to override the default Dockerfile name and/or location. By default, it is assumed to be a file named Dockerfile in the root of the build context.
:param pulumi.Input[str] image_tag: Custom image tag for the resulting docker image. If omitted a random string will be used
:param pulumi.Input[str] platform: The architecture of the platform you want to build this image for, e.g. `linux/arm64`.
:param pulumi.Input[str] registry_id: ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
:param pulumi.Input[str] target: The target of the dockerfile to build
"""
pulumi.set(__self__, "repository_url", repository_url)
Expand All @@ -51,6 +53,8 @@ def __init__(__self__, *,
pulumi.set(__self__, "image_tag", image_tag)
if platform is not None:
pulumi.set(__self__, "platform", platform)
if registry_id is not None:
pulumi.set(__self__, "registry_id", registry_id)
if target is not None:
pulumi.set(__self__, "target", target)

Expand Down Expand Up @@ -150,6 +154,18 @@ def platform(self) -> Optional[pulumi.Input[str]]:
def platform(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "platform", value)

@property
@pulumi.getter(name="registryId")
def registry_id(self) -> Optional[pulumi.Input[str]]:
"""
ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
"""
return pulumi.get(self, "registry_id")

@registry_id.setter
def registry_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "registry_id", value)

@property
@pulumi.getter
def target(self) -> Optional[pulumi.Input[str]]:
Expand All @@ -175,6 +191,7 @@ def __init__(__self__,
dockerfile: Optional[pulumi.Input[str]] = None,
image_tag: Optional[pulumi.Input[str]] = None,
platform: Optional[pulumi.Input[str]] = None,
registry_id: Optional[pulumi.Input[str]] = None,
repository_url: Optional[pulumi.Input[str]] = None,
target: Optional[pulumi.Input[str]] = None,
__props__=None):
Expand All @@ -190,6 +207,7 @@ def __init__(__self__,
:param pulumi.Input[str] dockerfile: dockerfile may be used to override the default Dockerfile name and/or location. By default, it is assumed to be a file named Dockerfile in the root of the build context.
:param pulumi.Input[str] image_tag: Custom image tag for the resulting docker image. If omitted a random string will be used
:param pulumi.Input[str] platform: The architecture of the platform you want to build this image for, e.g. `linux/arm64`.
:param pulumi.Input[str] registry_id: ID of the ECR registry in which to store the image. If not provided, this will be inferred from the repository URL)
:param pulumi.Input[str] repository_url: Url of the repository
:param pulumi.Input[str] target: The target of the dockerfile to build
"""
Expand Down Expand Up @@ -224,6 +242,7 @@ def _internal_init(__self__,
dockerfile: Optional[pulumi.Input[str]] = None,
image_tag: Optional[pulumi.Input[str]] = None,
platform: Optional[pulumi.Input[str]] = None,
registry_id: Optional[pulumi.Input[str]] = None,
repository_url: Optional[pulumi.Input[str]] = None,
target: Optional[pulumi.Input[str]] = None,
__props__=None):
Expand All @@ -244,6 +263,7 @@ def _internal_init(__self__,
__props__.__dict__["dockerfile"] = dockerfile
__props__.__dict__["image_tag"] = image_tag
__props__.__dict__["platform"] = platform
__props__.__dict__["registry_id"] = registry_id
if repository_url is None and not opts.urn:
raise TypeError("Missing required property 'repository_url'")
__props__.__dict__["repository_url"] = repository_url
Expand Down

0 comments on commit ab733bb

Please sign in to comment.