github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssm/serviceSetting.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 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // This setting defines how a user interacts with or uses a service or a feature of a service. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssm" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := ssm.NewServiceSetting(ctx, "test_setting", &ssm.ServiceSettingArgs{ 33 // SettingId: pulumi.String("arn:aws:ssm:us-east-1:123456789012:servicesetting/ssm/parameter-store/high-throughput-enabled"), 34 // SettingValue: pulumi.String("true"), 35 // }) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 // 46 // ## Import 47 // 48 // Using `pulumi import`, import AWS SSM Service Setting using the `setting_id`. For example: 49 // 50 // ```sh 51 // $ pulumi import aws:ssm/serviceSetting:ServiceSetting example arn:aws:ssm:us-east-1:123456789012:servicesetting/ssm/parameter-store/high-throughput-enabled 52 // ``` 53 type ServiceSetting struct { 54 pulumi.CustomResourceState 55 56 // ARN of the service setting. 57 Arn pulumi.StringOutput `pulumi:"arn"` 58 // ID of the service setting. 59 SettingId pulumi.StringOutput `pulumi:"settingId"` 60 // Value of the service setting. 61 SettingValue pulumi.StringOutput `pulumi:"settingValue"` 62 // Status of the service setting. Value can be `Default`, `Customized` or `PendingUpdate`. 63 Status pulumi.StringOutput `pulumi:"status"` 64 } 65 66 // NewServiceSetting registers a new resource with the given unique name, arguments, and options. 67 func NewServiceSetting(ctx *pulumi.Context, 68 name string, args *ServiceSettingArgs, opts ...pulumi.ResourceOption) (*ServiceSetting, error) { 69 if args == nil { 70 return nil, errors.New("missing one or more required arguments") 71 } 72 73 if args.SettingId == nil { 74 return nil, errors.New("invalid value for required argument 'SettingId'") 75 } 76 if args.SettingValue == nil { 77 return nil, errors.New("invalid value for required argument 'SettingValue'") 78 } 79 opts = internal.PkgResourceDefaultOpts(opts) 80 var resource ServiceSetting 81 err := ctx.RegisterResource("aws:ssm/serviceSetting:ServiceSetting", name, args, &resource, opts...) 82 if err != nil { 83 return nil, err 84 } 85 return &resource, nil 86 } 87 88 // GetServiceSetting gets an existing ServiceSetting resource's state with the given name, ID, and optional 89 // state properties that are used to uniquely qualify the lookup (nil if not required). 90 func GetServiceSetting(ctx *pulumi.Context, 91 name string, id pulumi.IDInput, state *ServiceSettingState, opts ...pulumi.ResourceOption) (*ServiceSetting, error) { 92 var resource ServiceSetting 93 err := ctx.ReadResource("aws:ssm/serviceSetting:ServiceSetting", name, id, state, &resource, opts...) 94 if err != nil { 95 return nil, err 96 } 97 return &resource, nil 98 } 99 100 // Input properties used for looking up and filtering ServiceSetting resources. 101 type serviceSettingState struct { 102 // ARN of the service setting. 103 Arn *string `pulumi:"arn"` 104 // ID of the service setting. 105 SettingId *string `pulumi:"settingId"` 106 // Value of the service setting. 107 SettingValue *string `pulumi:"settingValue"` 108 // Status of the service setting. Value can be `Default`, `Customized` or `PendingUpdate`. 109 Status *string `pulumi:"status"` 110 } 111 112 type ServiceSettingState struct { 113 // ARN of the service setting. 114 Arn pulumi.StringPtrInput 115 // ID of the service setting. 116 SettingId pulumi.StringPtrInput 117 // Value of the service setting. 118 SettingValue pulumi.StringPtrInput 119 // Status of the service setting. Value can be `Default`, `Customized` or `PendingUpdate`. 120 Status pulumi.StringPtrInput 121 } 122 123 func (ServiceSettingState) ElementType() reflect.Type { 124 return reflect.TypeOf((*serviceSettingState)(nil)).Elem() 125 } 126 127 type serviceSettingArgs struct { 128 // ID of the service setting. 129 SettingId string `pulumi:"settingId"` 130 // Value of the service setting. 131 SettingValue string `pulumi:"settingValue"` 132 } 133 134 // The set of arguments for constructing a ServiceSetting resource. 135 type ServiceSettingArgs struct { 136 // ID of the service setting. 137 SettingId pulumi.StringInput 138 // Value of the service setting. 139 SettingValue pulumi.StringInput 140 } 141 142 func (ServiceSettingArgs) ElementType() reflect.Type { 143 return reflect.TypeOf((*serviceSettingArgs)(nil)).Elem() 144 } 145 146 type ServiceSettingInput interface { 147 pulumi.Input 148 149 ToServiceSettingOutput() ServiceSettingOutput 150 ToServiceSettingOutputWithContext(ctx context.Context) ServiceSettingOutput 151 } 152 153 func (*ServiceSetting) ElementType() reflect.Type { 154 return reflect.TypeOf((**ServiceSetting)(nil)).Elem() 155 } 156 157 func (i *ServiceSetting) ToServiceSettingOutput() ServiceSettingOutput { 158 return i.ToServiceSettingOutputWithContext(context.Background()) 159 } 160 161 func (i *ServiceSetting) ToServiceSettingOutputWithContext(ctx context.Context) ServiceSettingOutput { 162 return pulumi.ToOutputWithContext(ctx, i).(ServiceSettingOutput) 163 } 164 165 // ServiceSettingArrayInput is an input type that accepts ServiceSettingArray and ServiceSettingArrayOutput values. 166 // You can construct a concrete instance of `ServiceSettingArrayInput` via: 167 // 168 // ServiceSettingArray{ ServiceSettingArgs{...} } 169 type ServiceSettingArrayInput interface { 170 pulumi.Input 171 172 ToServiceSettingArrayOutput() ServiceSettingArrayOutput 173 ToServiceSettingArrayOutputWithContext(context.Context) ServiceSettingArrayOutput 174 } 175 176 type ServiceSettingArray []ServiceSettingInput 177 178 func (ServiceSettingArray) ElementType() reflect.Type { 179 return reflect.TypeOf((*[]*ServiceSetting)(nil)).Elem() 180 } 181 182 func (i ServiceSettingArray) ToServiceSettingArrayOutput() ServiceSettingArrayOutput { 183 return i.ToServiceSettingArrayOutputWithContext(context.Background()) 184 } 185 186 func (i ServiceSettingArray) ToServiceSettingArrayOutputWithContext(ctx context.Context) ServiceSettingArrayOutput { 187 return pulumi.ToOutputWithContext(ctx, i).(ServiceSettingArrayOutput) 188 } 189 190 // ServiceSettingMapInput is an input type that accepts ServiceSettingMap and ServiceSettingMapOutput values. 191 // You can construct a concrete instance of `ServiceSettingMapInput` via: 192 // 193 // ServiceSettingMap{ "key": ServiceSettingArgs{...} } 194 type ServiceSettingMapInput interface { 195 pulumi.Input 196 197 ToServiceSettingMapOutput() ServiceSettingMapOutput 198 ToServiceSettingMapOutputWithContext(context.Context) ServiceSettingMapOutput 199 } 200 201 type ServiceSettingMap map[string]ServiceSettingInput 202 203 func (ServiceSettingMap) ElementType() reflect.Type { 204 return reflect.TypeOf((*map[string]*ServiceSetting)(nil)).Elem() 205 } 206 207 func (i ServiceSettingMap) ToServiceSettingMapOutput() ServiceSettingMapOutput { 208 return i.ToServiceSettingMapOutputWithContext(context.Background()) 209 } 210 211 func (i ServiceSettingMap) ToServiceSettingMapOutputWithContext(ctx context.Context) ServiceSettingMapOutput { 212 return pulumi.ToOutputWithContext(ctx, i).(ServiceSettingMapOutput) 213 } 214 215 type ServiceSettingOutput struct{ *pulumi.OutputState } 216 217 func (ServiceSettingOutput) ElementType() reflect.Type { 218 return reflect.TypeOf((**ServiceSetting)(nil)).Elem() 219 } 220 221 func (o ServiceSettingOutput) ToServiceSettingOutput() ServiceSettingOutput { 222 return o 223 } 224 225 func (o ServiceSettingOutput) ToServiceSettingOutputWithContext(ctx context.Context) ServiceSettingOutput { 226 return o 227 } 228 229 // ARN of the service setting. 230 func (o ServiceSettingOutput) Arn() pulumi.StringOutput { 231 return o.ApplyT(func(v *ServiceSetting) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 232 } 233 234 // ID of the service setting. 235 func (o ServiceSettingOutput) SettingId() pulumi.StringOutput { 236 return o.ApplyT(func(v *ServiceSetting) pulumi.StringOutput { return v.SettingId }).(pulumi.StringOutput) 237 } 238 239 // Value of the service setting. 240 func (o ServiceSettingOutput) SettingValue() pulumi.StringOutput { 241 return o.ApplyT(func(v *ServiceSetting) pulumi.StringOutput { return v.SettingValue }).(pulumi.StringOutput) 242 } 243 244 // Status of the service setting. Value can be `Default`, `Customized` or `PendingUpdate`. 245 func (o ServiceSettingOutput) Status() pulumi.StringOutput { 246 return o.ApplyT(func(v *ServiceSetting) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 247 } 248 249 type ServiceSettingArrayOutput struct{ *pulumi.OutputState } 250 251 func (ServiceSettingArrayOutput) ElementType() reflect.Type { 252 return reflect.TypeOf((*[]*ServiceSetting)(nil)).Elem() 253 } 254 255 func (o ServiceSettingArrayOutput) ToServiceSettingArrayOutput() ServiceSettingArrayOutput { 256 return o 257 } 258 259 func (o ServiceSettingArrayOutput) ToServiceSettingArrayOutputWithContext(ctx context.Context) ServiceSettingArrayOutput { 260 return o 261 } 262 263 func (o ServiceSettingArrayOutput) Index(i pulumi.IntInput) ServiceSettingOutput { 264 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceSetting { 265 return vs[0].([]*ServiceSetting)[vs[1].(int)] 266 }).(ServiceSettingOutput) 267 } 268 269 type ServiceSettingMapOutput struct{ *pulumi.OutputState } 270 271 func (ServiceSettingMapOutput) ElementType() reflect.Type { 272 return reflect.TypeOf((*map[string]*ServiceSetting)(nil)).Elem() 273 } 274 275 func (o ServiceSettingMapOutput) ToServiceSettingMapOutput() ServiceSettingMapOutput { 276 return o 277 } 278 279 func (o ServiceSettingMapOutput) ToServiceSettingMapOutputWithContext(ctx context.Context) ServiceSettingMapOutput { 280 return o 281 } 282 283 func (o ServiceSettingMapOutput) MapIndex(k pulumi.StringInput) ServiceSettingOutput { 284 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceSetting { 285 return vs[0].(map[string]*ServiceSetting)[vs[1].(string)] 286 }).(ServiceSettingOutput) 287 } 288 289 func init() { 290 pulumi.RegisterInputType(reflect.TypeOf((*ServiceSettingInput)(nil)).Elem(), &ServiceSetting{}) 291 pulumi.RegisterInputType(reflect.TypeOf((*ServiceSettingArrayInput)(nil)).Elem(), ServiceSettingArray{}) 292 pulumi.RegisterInputType(reflect.TypeOf((*ServiceSettingMapInput)(nil)).Elem(), ServiceSettingMap{}) 293 pulumi.RegisterOutputType(ServiceSettingOutput{}) 294 pulumi.RegisterOutputType(ServiceSettingArrayOutput{}) 295 pulumi.RegisterOutputType(ServiceSettingMapOutput{}) 296 }