com.pulumi.aws.codecommit.ApprovalRuleTemplate Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.codecommit;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.codecommit.ApprovalRuleTemplateArgs;
import com.pulumi.aws.codecommit.inputs.ApprovalRuleTemplateState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Provides a CodeCommit Approval Rule Template Resource.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.codecommit.ApprovalRuleTemplate;
* import com.pulumi.aws.codecommit.ApprovalRuleTemplateArgs;
* import static com.pulumi.codegen.internal.Serialization.*;
* import java.util.List;
* import java.util.ArrayList;
* 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 ApprovalRuleTemplate("example", ApprovalRuleTemplateArgs.builder()
* .name("MyExampleApprovalRuleTemplate")
* .description("This is an example approval rule template")
* .content(serializeJson(
* jsonObject(
* jsonProperty("Version", "2018-11-08"),
* jsonProperty("DestinationReferences", jsonArray("refs/heads/master")),
* jsonProperty("Statements", jsonArray(jsonObject(
* jsonProperty("Type", "Approvers"),
* jsonProperty("NumberOfApprovalsNeeded", 2),
* jsonProperty("ApprovalPoolMembers", jsonArray("arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*"))
* )))
* )))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import CodeCommit approval rule templates using the `name`. For example:
*
* ```sh
* $ pulumi import aws:codecommit/approvalRuleTemplate:ApprovalRuleTemplate imported ExistingApprovalRuleTemplateName
* ```
*
*/
@ResourceType(type="aws:codecommit/approvalRuleTemplate:ApprovalRuleTemplate")
public class ApprovalRuleTemplate extends com.pulumi.resources.CustomResource {
/**
* The ID of the approval rule template
*
*/
@Export(name="approvalRuleTemplateId", refs={String.class}, tree="[0]")
private Output approvalRuleTemplateId;
/**
* @return The ID of the approval rule template
*
*/
public Output approvalRuleTemplateId() {
return this.approvalRuleTemplateId;
}
/**
* The content of the approval rule template. Maximum of 3000 characters.
*
*/
@Export(name="content", refs={String.class}, tree="[0]")
private Output content;
/**
* @return The content of the approval rule template. Maximum of 3000 characters.
*
*/
public Output content() {
return this.content;
}
/**
* The date the approval rule template was created, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
*
*/
@Export(name="creationDate", refs={String.class}, tree="[0]")
private Output creationDate;
/**
* @return The date the approval rule template was created, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
*
*/
public Output creationDate() {
return this.creationDate;
}
/**
* The description of the approval rule template. Maximum of 1000 characters.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description of the approval rule template. Maximum of 1000 characters.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* The date the approval rule template was most recently changed, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
*
*/
@Export(name="lastModifiedDate", refs={String.class}, tree="[0]")
private Output lastModifiedDate;
/**
* @return The date the approval rule template was most recently changed, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8).
*
*/
public Output lastModifiedDate() {
return this.lastModifiedDate;
}
/**
* The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*
*/
@Export(name="lastModifiedUser", refs={String.class}, tree="[0]")
private Output lastModifiedUser;
/**
* @return The Amazon Resource Name (ARN) of the user who made the most recent changes to the approval rule template.
*
*/
public Output lastModifiedUser() {
return this.lastModifiedUser;
}
/**
* The name for the approval rule template. Maximum of 100 characters.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name for the approval rule template. Maximum of 100 characters.
*
*/
public Output name() {
return this.name;
}
/**
* The SHA-256 hash signature for the content of the approval rule template.
*
*/
@Export(name="ruleContentSha256", refs={String.class}, tree="[0]")
private Output ruleContentSha256;
/**
* @return The SHA-256 hash signature for the content of the approval rule template.
*
*/
public Output ruleContentSha256() {
return this.ruleContentSha256;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ApprovalRuleTemplate(java.lang.String name) {
this(name, ApprovalRuleTemplateArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ApprovalRuleTemplate(java.lang.String name, ApprovalRuleTemplateArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public ApprovalRuleTemplate(java.lang.String name, ApprovalRuleTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:codecommit/approvalRuleTemplate:ApprovalRuleTemplate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ApprovalRuleTemplate(java.lang.String name, Output id, @Nullable ApprovalRuleTemplateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("aws:codecommit/approvalRuleTemplate:ApprovalRuleTemplate", name, state, makeResourceOptions(options, id), false);
}
private static ApprovalRuleTemplateArgs makeArgs(ApprovalRuleTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ApprovalRuleTemplateArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static ApprovalRuleTemplate get(java.lang.String name, Output id, @Nullable ApprovalRuleTemplateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ApprovalRuleTemplate(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy