Try AWS Native preview for resources not in the classic version.
aws.codecommit.ApprovalRuleTemplateAssociation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Associates a CodeCommit Approval Rule Template with a Repository.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CodeCommit.ApprovalRuleTemplateAssociation("example", new()
{
ApprovalRuleTemplateName = aws_codecommit_approval_rule_template.Example.Name,
RepositoryName = aws_codecommit_repository.Example.Repository_name,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/codecommit"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := codecommit.NewApprovalRuleTemplateAssociation(ctx, "example", &codecommit.ApprovalRuleTemplateAssociationArgs{
ApprovalRuleTemplateName: pulumi.Any(aws_codecommit_approval_rule_template.Example.Name),
RepositoryName: pulumi.Any(aws_codecommit_repository.Example.Repository_name),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.codecommit.ApprovalRuleTemplateAssociation;
import com.pulumi.aws.codecommit.ApprovalRuleTemplateAssociationArgs;
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 ApprovalRuleTemplateAssociation("example", ApprovalRuleTemplateAssociationArgs.builder()
.approvalRuleTemplateName(aws_codecommit_approval_rule_template.example().name())
.repositoryName(aws_codecommit_repository.example().repository_name())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.codecommit.ApprovalRuleTemplateAssociation("example",
approval_rule_template_name=aws_codecommit_approval_rule_template["example"]["name"],
repository_name=aws_codecommit_repository["example"]["repository_name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.codecommit.ApprovalRuleTemplateAssociation("example", {
approvalRuleTemplateName: aws_codecommit_approval_rule_template.example.name,
repositoryName: aws_codecommit_repository.example.repository_name,
});
resources:
example:
type: aws:codecommit:ApprovalRuleTemplateAssociation
properties:
approvalRuleTemplateName: ${aws_codecommit_approval_rule_template.example.name}
repositoryName: ${aws_codecommit_repository.example.repository_name}
Create ApprovalRuleTemplateAssociation Resource
new ApprovalRuleTemplateAssociation(name: string, args: ApprovalRuleTemplateAssociationArgs, opts?: CustomResourceOptions);
@overload
def ApprovalRuleTemplateAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
approval_rule_template_name: Optional[str] = None,
repository_name: Optional[str] = None)
@overload
def ApprovalRuleTemplateAssociation(resource_name: str,
args: ApprovalRuleTemplateAssociationArgs,
opts: Optional[ResourceOptions] = None)
func NewApprovalRuleTemplateAssociation(ctx *Context, name string, args ApprovalRuleTemplateAssociationArgs, opts ...ResourceOption) (*ApprovalRuleTemplateAssociation, error)
public ApprovalRuleTemplateAssociation(string name, ApprovalRuleTemplateAssociationArgs args, CustomResourceOptions? opts = null)
public ApprovalRuleTemplateAssociation(String name, ApprovalRuleTemplateAssociationArgs args)
public ApprovalRuleTemplateAssociation(String name, ApprovalRuleTemplateAssociationArgs args, CustomResourceOptions options)
type: aws:codecommit:ApprovalRuleTemplateAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApprovalRuleTemplateAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApprovalRuleTemplateAssociationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApprovalRuleTemplateAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApprovalRuleTemplateAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApprovalRuleTemplateAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApprovalRuleTemplateAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApprovalRuleTemplateAssociation resource accepts the following input properties:
- Approval
Rule stringTemplate Name The name for the approval rule template.
- Repository
Name string The name of the repository that you want to associate with the template.
- Approval
Rule stringTemplate Name The name for the approval rule template.
- Repository
Name string The name of the repository that you want to associate with the template.
- approval
Rule StringTemplate Name The name for the approval rule template.
- repository
Name String The name of the repository that you want to associate with the template.
- approval
Rule stringTemplate Name The name for the approval rule template.
- repository
Name string The name of the repository that you want to associate with the template.
- approval_
rule_ strtemplate_ name The name for the approval rule template.
- repository_
name str The name of the repository that you want to associate with the template.
- approval
Rule StringTemplate Name The name for the approval rule template.
- repository
Name String The name of the repository that you want to associate with the template.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApprovalRuleTemplateAssociation resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ApprovalRuleTemplateAssociation Resource
Get an existing ApprovalRuleTemplateAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApprovalRuleTemplateAssociationState, opts?: CustomResourceOptions): ApprovalRuleTemplateAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
approval_rule_template_name: Optional[str] = None,
repository_name: Optional[str] = None) -> ApprovalRuleTemplateAssociation
func GetApprovalRuleTemplateAssociation(ctx *Context, name string, id IDInput, state *ApprovalRuleTemplateAssociationState, opts ...ResourceOption) (*ApprovalRuleTemplateAssociation, error)
public static ApprovalRuleTemplateAssociation Get(string name, Input<string> id, ApprovalRuleTemplateAssociationState? state, CustomResourceOptions? opts = null)
public static ApprovalRuleTemplateAssociation get(String name, Output<String> id, ApprovalRuleTemplateAssociationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Approval
Rule stringTemplate Name The name for the approval rule template.
- Repository
Name string The name of the repository that you want to associate with the template.
- Approval
Rule stringTemplate Name The name for the approval rule template.
- Repository
Name string The name of the repository that you want to associate with the template.
- approval
Rule StringTemplate Name The name for the approval rule template.
- repository
Name String The name of the repository that you want to associate with the template.
- approval
Rule stringTemplate Name The name for the approval rule template.
- repository
Name string The name of the repository that you want to associate with the template.
- approval_
rule_ strtemplate_ name The name for the approval rule template.
- repository_
name str The name of the repository that you want to associate with the template.
- approval
Rule StringTemplate Name The name for the approval rule template.
- repository
Name String The name of the repository that you want to associate with the template.
Import
CodeCommit approval rule template associations can be imported using the approval_rule_template_name
and repository_name
separated by a comma (,
), e.g.
$ pulumi import aws:codecommit/approvalRuleTemplateAssociation:ApprovalRuleTemplateAssociation example approver-rule-for-example,MyExampleRepo
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.