aws.codecommit.ApprovalRuleTemplateAssociation
Explore with Pulumi AI
Associates a CodeCommit Approval Rule Template with a Repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.codecommit.ApprovalRuleTemplateAssociation("example", {
approvalRuleTemplateName: exampleAwsCodecommitApprovalRuleTemplate.name,
repositoryName: exampleAwsCodecommitRepository.repositoryName,
});
import pulumi
import pulumi_aws as aws
example = aws.codecommit.ApprovalRuleTemplateAssociation("example",
approval_rule_template_name=example_aws_codecommit_approval_rule_template["name"],
repository_name=example_aws_codecommit_repository["repositoryName"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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(exampleAwsCodecommitApprovalRuleTemplate.Name),
RepositoryName: pulumi.Any(exampleAwsCodecommitRepository.RepositoryName),
})
if err != nil {
return err
}
return nil
})
}
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 = exampleAwsCodecommitApprovalRuleTemplate.Name,
RepositoryName = exampleAwsCodecommitRepository.RepositoryName,
});
});
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(exampleAwsCodecommitApprovalRuleTemplate.name())
.repositoryName(exampleAwsCodecommitRepository.repositoryName())
.build());
}
}
resources:
example:
type: aws:codecommit:ApprovalRuleTemplateAssociation
properties:
approvalRuleTemplateName: ${exampleAwsCodecommitApprovalRuleTemplate.name}
repositoryName: ${exampleAwsCodecommitRepository.repositoryName}
Create ApprovalRuleTemplateAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApprovalRuleTemplateAssociation(name: string, args: ApprovalRuleTemplateAssociationArgs, opts?: CustomResourceOptions);
@overload
def ApprovalRuleTemplateAssociation(resource_name: str,
args: ApprovalRuleTemplateAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApprovalRuleTemplateAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
approval_rule_template_name: Optional[str] = None,
repository_name: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var approvalRuleTemplateAssociationResource = new Aws.CodeCommit.ApprovalRuleTemplateAssociation("approvalRuleTemplateAssociationResource", new()
{
ApprovalRuleTemplateName = "string",
RepositoryName = "string",
});
example, err := codecommit.NewApprovalRuleTemplateAssociation(ctx, "approvalRuleTemplateAssociationResource", &codecommit.ApprovalRuleTemplateAssociationArgs{
ApprovalRuleTemplateName: pulumi.String("string"),
RepositoryName: pulumi.String("string"),
})
var approvalRuleTemplateAssociationResource = new ApprovalRuleTemplateAssociation("approvalRuleTemplateAssociationResource", ApprovalRuleTemplateAssociationArgs.builder()
.approvalRuleTemplateName("string")
.repositoryName("string")
.build());
approval_rule_template_association_resource = aws.codecommit.ApprovalRuleTemplateAssociation("approvalRuleTemplateAssociationResource",
approval_rule_template_name="string",
repository_name="string")
const approvalRuleTemplateAssociationResource = new aws.codecommit.ApprovalRuleTemplateAssociation("approvalRuleTemplateAssociationResource", {
approvalRuleTemplateName: "string",
repositoryName: "string",
});
type: aws:codecommit:ApprovalRuleTemplateAssociation
properties:
approvalRuleTemplateName: string
repositoryName: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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
Using pulumi import
, import CodeCommit approval rule template associations using the approval_rule_template_name
and repository_name
separated by a comma (,
). For example:
$ pulumi import aws:codecommit/approvalRuleTemplateAssociation:ApprovalRuleTemplateAssociation example approver-rule-for-example,MyExampleRepo
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.