github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssm/getContactsRotation.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 ssm 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 // ## Example Usage 15 // 16 // ### Basic Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm" 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 := ssm.LookupContactsRotation(ctx, &ssm.LookupContactsRotationArgs{ 32 // Arn: "arn:aws:ssm-contacts:us-east-1:012345678910:rotation/example", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupContactsRotation(ctx *pulumi.Context, args *LookupContactsRotationArgs, opts ...pulumi.InvokeOption) (*LookupContactsRotationResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupContactsRotationResult 46 err := ctx.Invoke("aws:ssm/getContactsRotation:getContactsRotation", 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 getContactsRotation. 54 type LookupContactsRotationArgs struct { 55 // The Amazon Resource Name (ARN) of the rotation. 56 Arn string `pulumi:"arn"` 57 } 58 59 // A collection of values returned by getContactsRotation. 60 type LookupContactsRotationResult struct { 61 Arn string `pulumi:"arn"` 62 // The Amazon Resource Names (ARNs) of the contacts to add to the rotation. The order in which you list the contacts is their shift order in the rotation schedule. 63 ContactIds []string `pulumi:"contactIds"` 64 Id string `pulumi:"id"` 65 // The name for the rotation. 66 Name string `pulumi:"name"` 67 // Information about when an on-call rotation is in effect and how long the rotation period lasts. 68 Recurrences []GetContactsRotationRecurrence `pulumi:"recurrences"` 69 // The date and time, in RFC 3339 format, that the rotation goes into effect. 70 StartTime string `pulumi:"startTime"` 71 // A map of tags to assign to the resource. 72 Tags map[string]string `pulumi:"tags"` 73 // The time zone to base the rotation’s activity on in Internet Assigned Numbers Authority (IANA) format. 74 TimeZoneId string `pulumi:"timeZoneId"` 75 } 76 77 func LookupContactsRotationOutput(ctx *pulumi.Context, args LookupContactsRotationOutputArgs, opts ...pulumi.InvokeOption) LookupContactsRotationResultOutput { 78 return pulumi.ToOutputWithContext(context.Background(), args). 79 ApplyT(func(v interface{}) (LookupContactsRotationResult, error) { 80 args := v.(LookupContactsRotationArgs) 81 r, err := LookupContactsRotation(ctx, &args, opts...) 82 var s LookupContactsRotationResult 83 if r != nil { 84 s = *r 85 } 86 return s, err 87 }).(LookupContactsRotationResultOutput) 88 } 89 90 // A collection of arguments for invoking getContactsRotation. 91 type LookupContactsRotationOutputArgs struct { 92 // The Amazon Resource Name (ARN) of the rotation. 93 Arn pulumi.StringInput `pulumi:"arn"` 94 } 95 96 func (LookupContactsRotationOutputArgs) ElementType() reflect.Type { 97 return reflect.TypeOf((*LookupContactsRotationArgs)(nil)).Elem() 98 } 99 100 // A collection of values returned by getContactsRotation. 101 type LookupContactsRotationResultOutput struct{ *pulumi.OutputState } 102 103 func (LookupContactsRotationResultOutput) ElementType() reflect.Type { 104 return reflect.TypeOf((*LookupContactsRotationResult)(nil)).Elem() 105 } 106 107 func (o LookupContactsRotationResultOutput) ToLookupContactsRotationResultOutput() LookupContactsRotationResultOutput { 108 return o 109 } 110 111 func (o LookupContactsRotationResultOutput) ToLookupContactsRotationResultOutputWithContext(ctx context.Context) LookupContactsRotationResultOutput { 112 return o 113 } 114 115 func (o LookupContactsRotationResultOutput) Arn() pulumi.StringOutput { 116 return o.ApplyT(func(v LookupContactsRotationResult) string { return v.Arn }).(pulumi.StringOutput) 117 } 118 119 // The Amazon Resource Names (ARNs) of the contacts to add to the rotation. The order in which you list the contacts is their shift order in the rotation schedule. 120 func (o LookupContactsRotationResultOutput) ContactIds() pulumi.StringArrayOutput { 121 return o.ApplyT(func(v LookupContactsRotationResult) []string { return v.ContactIds }).(pulumi.StringArrayOutput) 122 } 123 124 func (o LookupContactsRotationResultOutput) Id() pulumi.StringOutput { 125 return o.ApplyT(func(v LookupContactsRotationResult) string { return v.Id }).(pulumi.StringOutput) 126 } 127 128 // The name for the rotation. 129 func (o LookupContactsRotationResultOutput) Name() pulumi.StringOutput { 130 return o.ApplyT(func(v LookupContactsRotationResult) string { return v.Name }).(pulumi.StringOutput) 131 } 132 133 // Information about when an on-call rotation is in effect and how long the rotation period lasts. 134 func (o LookupContactsRotationResultOutput) Recurrences() GetContactsRotationRecurrenceArrayOutput { 135 return o.ApplyT(func(v LookupContactsRotationResult) []GetContactsRotationRecurrence { return v.Recurrences }).(GetContactsRotationRecurrenceArrayOutput) 136 } 137 138 // The date and time, in RFC 3339 format, that the rotation goes into effect. 139 func (o LookupContactsRotationResultOutput) StartTime() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupContactsRotationResult) string { return v.StartTime }).(pulumi.StringOutput) 141 } 142 143 // A map of tags to assign to the resource. 144 func (o LookupContactsRotationResultOutput) Tags() pulumi.StringMapOutput { 145 return o.ApplyT(func(v LookupContactsRotationResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 146 } 147 148 // The time zone to base the rotation’s activity on in Internet Assigned Numbers Authority (IANA) format. 149 func (o LookupContactsRotationResultOutput) TimeZoneId() pulumi.StringOutput { 150 return o.ApplyT(func(v LookupContactsRotationResult) string { return v.TimeZoneId }).(pulumi.StringOutput) 151 } 152 153 func init() { 154 pulumi.RegisterOutputType(LookupContactsRotationResultOutput{}) 155 }