github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/codecommit/getApprovalRuleTemplate.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package codecommit 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides details about a specific CodeCommit Approval Rule Template. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codecommit" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := codecommit.LookupApprovalRuleTemplate(ctx, &codecommit.LookupApprovalRuleTemplateArgs{ 32 // Name: "MyExampleApprovalRuleTemplate", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupApprovalRuleTemplate(ctx *pulumi.Context, args *LookupApprovalRuleTemplateArgs, opts ...pulumi.InvokeOption) (*LookupApprovalRuleTemplateResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupApprovalRuleTemplateResult 46 err := ctx.Invoke("aws:codecommit/getApprovalRuleTemplate:getApprovalRuleTemplate", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getApprovalRuleTemplate. 54 type LookupApprovalRuleTemplateArgs struct { 55 // Name for the approval rule template. This needs to be less than 100 characters. 56 Name string `pulumi:"name"` 57 } 58 59 // A collection of values returned by getApprovalRuleTemplate. 60 type LookupApprovalRuleTemplateResult struct { 61 // The ID of the approval rule template. 62 ApprovalRuleTemplateId string `pulumi:"approvalRuleTemplateId"` 63 // Content of the approval rule template. 64 Content string `pulumi:"content"` 65 // Date the approval rule template was created, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). 66 CreationDate string `pulumi:"creationDate"` 67 // Description of the approval rule template. 68 Description string `pulumi:"description"` 69 // The provider-assigned unique ID for this managed resource. 70 Id string `pulumi:"id"` 71 // Date the approval rule template was most recently changed, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). 72 LastModifiedDate string `pulumi:"lastModifiedDate"` 73 // ARN of the user who made the most recent changes to the approval rule template. 74 LastModifiedUser string `pulumi:"lastModifiedUser"` 75 Name string `pulumi:"name"` 76 // SHA-256 hash signature for the content of the approval rule template. 77 RuleContentSha256 string `pulumi:"ruleContentSha256"` 78 } 79 80 func LookupApprovalRuleTemplateOutput(ctx *pulumi.Context, args LookupApprovalRuleTemplateOutputArgs, opts ...pulumi.InvokeOption) LookupApprovalRuleTemplateResultOutput { 81 return pulumi.ToOutputWithContext(context.Background(), args). 82 ApplyT(func(v interface{}) (LookupApprovalRuleTemplateResult, error) { 83 args := v.(LookupApprovalRuleTemplateArgs) 84 r, err := LookupApprovalRuleTemplate(ctx, &args, opts...) 85 var s LookupApprovalRuleTemplateResult 86 if r != nil { 87 s = *r 88 } 89 return s, err 90 }).(LookupApprovalRuleTemplateResultOutput) 91 } 92 93 // A collection of arguments for invoking getApprovalRuleTemplate. 94 type LookupApprovalRuleTemplateOutputArgs struct { 95 // Name for the approval rule template. This needs to be less than 100 characters. 96 Name pulumi.StringInput `pulumi:"name"` 97 } 98 99 func (LookupApprovalRuleTemplateOutputArgs) ElementType() reflect.Type { 100 return reflect.TypeOf((*LookupApprovalRuleTemplateArgs)(nil)).Elem() 101 } 102 103 // A collection of values returned by getApprovalRuleTemplate. 104 type LookupApprovalRuleTemplateResultOutput struct{ *pulumi.OutputState } 105 106 func (LookupApprovalRuleTemplateResultOutput) ElementType() reflect.Type { 107 return reflect.TypeOf((*LookupApprovalRuleTemplateResult)(nil)).Elem() 108 } 109 110 func (o LookupApprovalRuleTemplateResultOutput) ToLookupApprovalRuleTemplateResultOutput() LookupApprovalRuleTemplateResultOutput { 111 return o 112 } 113 114 func (o LookupApprovalRuleTemplateResultOutput) ToLookupApprovalRuleTemplateResultOutputWithContext(ctx context.Context) LookupApprovalRuleTemplateResultOutput { 115 return o 116 } 117 118 // The ID of the approval rule template. 119 func (o LookupApprovalRuleTemplateResultOutput) ApprovalRuleTemplateId() pulumi.StringOutput { 120 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.ApprovalRuleTemplateId }).(pulumi.StringOutput) 121 } 122 123 // Content of the approval rule template. 124 func (o LookupApprovalRuleTemplateResultOutput) Content() pulumi.StringOutput { 125 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.Content }).(pulumi.StringOutput) 126 } 127 128 // Date the approval rule template was created, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). 129 func (o LookupApprovalRuleTemplateResultOutput) CreationDate() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.CreationDate }).(pulumi.StringOutput) 131 } 132 133 // Description of the approval rule template. 134 func (o LookupApprovalRuleTemplateResultOutput) Description() pulumi.StringOutput { 135 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.Description }).(pulumi.StringOutput) 136 } 137 138 // The provider-assigned unique ID for this managed resource. 139 func (o LookupApprovalRuleTemplateResultOutput) Id() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.Id }).(pulumi.StringOutput) 141 } 142 143 // Date the approval rule template was most recently changed, in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8). 144 func (o LookupApprovalRuleTemplateResultOutput) LastModifiedDate() pulumi.StringOutput { 145 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.LastModifiedDate }).(pulumi.StringOutput) 146 } 147 148 // ARN of the user who made the most recent changes to the approval rule template. 149 func (o LookupApprovalRuleTemplateResultOutput) LastModifiedUser() pulumi.StringOutput { 150 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.LastModifiedUser }).(pulumi.StringOutput) 151 } 152 153 func (o LookupApprovalRuleTemplateResultOutput) Name() pulumi.StringOutput { 154 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.Name }).(pulumi.StringOutput) 155 } 156 157 // SHA-256 hash signature for the content of the approval rule template. 158 func (o LookupApprovalRuleTemplateResultOutput) RuleContentSha256() pulumi.StringOutput { 159 return o.ApplyT(func(v LookupApprovalRuleTemplateResult) string { return v.RuleContentSha256 }).(pulumi.StringOutput) 160 } 161 162 func init() { 163 pulumi.RegisterOutputType(LookupApprovalRuleTemplateResultOutput{}) 164 }