AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

ApprovalRuleTemplateAssociation

Associates a CodeCommit Approval Rule Template with a Repository.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.CodeCommit.ApprovalRuleTemplateAssociation("example", new Aws.CodeCommit.ApprovalRuleTemplateAssociationArgs
        {
            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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 a 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:

ApprovalRuleTemplateName string

The name for the approval rule template.

RepositoryName string

The name of the repository that you want to associate with the template.

ApprovalRuleTemplateName string

The name for the approval rule template.

RepositoryName string

The name of the repository that you want to associate with the template.

approvalRuleTemplateName String

The name for the approval rule template.

repositoryName String

The name of the repository that you want to associate with the template.

approvalRuleTemplateName string

The name for the approval rule template.

repositoryName string

The name of the repository that you want to associate with the template.

approval_rule_template_name str

The name for the approval rule template.

repository_name str

The name of the repository that you want to associate with the template.

approvalRuleTemplateName String

The name for the approval rule template.

repositoryName 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 an 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.
The following state arguments are supported:
ApprovalRuleTemplateName string

The name for the approval rule template.

RepositoryName string

The name of the repository that you want to associate with the template.

ApprovalRuleTemplateName string

The name for the approval rule template.

RepositoryName string

The name of the repository that you want to associate with the template.

approvalRuleTemplateName String

The name for the approval rule template.

repositoryName String

The name of the repository that you want to associate with the template.

approvalRuleTemplateName string

The name for the approval rule template.

repositoryName string

The name of the repository that you want to associate with the template.

approval_rule_template_name str

The name for the approval rule template.

repository_name str

The name of the repository that you want to associate with the template.

approvalRuleTemplateName String

The name for the approval rule template.

repositoryName 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
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.