Package com.pulumi.aws.ecr
Class PullTimeUpdateExclusion
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ecr.PullTimeUpdateExclusion
-
public class PullTimeUpdateExclusion extends com.pulumi.resources.CustomResourceManages an AWS ECR (Elastic Container Registry) Pull Time Update Exclusion. ## Example Usage ### Basic Usage
### With IAM Userpackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.iam.Role; import com.pulumi.aws.iam.RoleArgs; import com.pulumi.aws.iam.RolePolicy; import com.pulumi.aws.iam.RolePolicyArgs; import com.pulumi.aws.ecr.PullTimeUpdateExclusion; import com.pulumi.aws.ecr.PullTimeUpdateExclusionArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new Role("example", RoleArgs.builder() .name("example-role") .assumeRolePolicy(serializeJson( jsonObject( jsonProperty("Version", "2012-10-17"), jsonProperty("Statement", jsonArray(jsonObject( jsonProperty("Action", "sts:AssumeRole"), jsonProperty("Effect", "Allow"), jsonProperty("Principal", jsonObject( jsonProperty("Service", "ec2.amazonaws.com") )) ))) ))) .build()); var exampleRolePolicy = new RolePolicy("exampleRolePolicy", RolePolicyArgs.builder() .name("example-role-policy") .role(example.id()) .policy(serializeJson( jsonObject( jsonProperty("Version", "2012-10-17"), jsonProperty("Statement", jsonArray(jsonObject( jsonProperty("Effect", "Allow"), jsonProperty("Action", jsonArray( "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" )), jsonProperty("Resource", "*") ))) ))) .build()); var examplePullTimeUpdateExclusion = new PullTimeUpdateExclusion("examplePullTimeUpdateExclusion", PullTimeUpdateExclusionArgs.builder() .principalArn(example.arn()) .build()); } }
## Import Using `pulumi import`, import ECR (Elastic Container Registry) Pull Time Update Exclusion using the `principalArn`. For example: ```sh $ pulumi import aws:ecr/pullTimeUpdateExclusion:PullTimeUpdateExclusion example arn:aws:iam::123456789012:role/example-role ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.iam.User; import com.pulumi.aws.iam.UserArgs; import com.pulumi.aws.iam.UserPolicy; import com.pulumi.aws.iam.UserPolicyArgs; import com.pulumi.aws.ecr.PullTimeUpdateExclusion; import com.pulumi.aws.ecr.PullTimeUpdateExclusionArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var example = new User("example", UserArgs.builder() .name("example-user") .build()); var exampleUserPolicy = new UserPolicy("exampleUserPolicy", UserPolicyArgs.builder() .name("example-user-policy") .user(example.name()) .policy(serializeJson( jsonObject( jsonProperty("Version", "2012-10-17"), jsonProperty("Statement", jsonArray(jsonObject( jsonProperty("Effect", "Allow"), jsonProperty("Action", jsonArray( "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage" )), jsonProperty("Resource", "*") ))) ))) .build()); var examplePullTimeUpdateExclusion = new PullTimeUpdateExclusion("examplePullTimeUpdateExclusion", PullTimeUpdateExclusionArgs.builder() .principalArn(example.arn()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description PullTimeUpdateExclusion(java.lang.String name)PullTimeUpdateExclusion(java.lang.String name, PullTimeUpdateExclusionArgs args)PullTimeUpdateExclusion(java.lang.String name, PullTimeUpdateExclusionArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PullTimeUpdateExclusionget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, PullTimeUpdateExclusionState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>principalArn()com.pulumi.core.Output<java.lang.String>region()
-
-
-
Constructor Detail
-
PullTimeUpdateExclusion
public PullTimeUpdateExclusion(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
PullTimeUpdateExclusion
public PullTimeUpdateExclusion(java.lang.String name, PullTimeUpdateExclusionArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
PullTimeUpdateExclusion
public PullTimeUpdateExclusion(java.lang.String name, PullTimeUpdateExclusionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
principalArn
public com.pulumi.core.Output<java.lang.String> principalArn()
- Returns:
- ARN of the IAM principal to exclude from having image pull times recorded. The following arguments are optional:
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
get
public static PullTimeUpdateExclusion get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable PullTimeUpdateExclusionState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-