github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/appautoscaling/target.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 appautoscaling 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 // Provides an Application AutoScaling ScalableTarget resource. To manage policies which get attached to the target, see the `appautoscaling.Policy` resource. 16 // 17 // > **NOTE:** Scalable targets created before 2023-03-20 may not have an assigned `arn`. These resource cannot use `tags` or participate in `defaultTags`. To prevent `pulumi preview` showing differences that can never be reconciled, use the `lifecycle.ignore_changes` meta-argument. See the example below. 18 // 19 // > **NOTE:** The [Application Auto Scaling service automatically attempts to manage IAM Service-Linked Roles](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) when registering certain service namespaces for the first time. To manually manage this role, see the `iam.ServiceLinkedRole` resource. 20 // 21 // ## Example Usage 22 // 23 // ### DynamoDB Table Autoscaling 24 // 25 // <!--Start PulumiCodeChooser --> 26 // ```go 27 // package main 28 // 29 // import ( 30 // 31 // "fmt" 32 // 33 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling" 34 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 35 // 36 // ) 37 // 38 // func main() { 39 // pulumi.Run(func(ctx *pulumi.Context) error { 40 // _, err := appautoscaling.NewTarget(ctx, "dynamodb_table_read_target", &appautoscaling.TargetArgs{ 41 // MaxCapacity: pulumi.Int(100), 42 // MinCapacity: pulumi.Int(5), 43 // ResourceId: pulumi.String(fmt.Sprintf("table/%v", example.Name)), 44 // ScalableDimension: pulumi.String("dynamodb:table:ReadCapacityUnits"), 45 // ServiceNamespace: pulumi.String("dynamodb"), 46 // }) 47 // if err != nil { 48 // return err 49 // } 50 // return nil 51 // }) 52 // } 53 // 54 // ``` 55 // <!--End PulumiCodeChooser --> 56 // 57 // ### DynamoDB Index Autoscaling 58 // 59 // <!--Start PulumiCodeChooser --> 60 // ```go 61 // package main 62 // 63 // import ( 64 // 65 // "fmt" 66 // 67 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling" 68 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 69 // 70 // ) 71 // 72 // func main() { 73 // pulumi.Run(func(ctx *pulumi.Context) error { 74 // _, err := appautoscaling.NewTarget(ctx, "dynamodb_index_read_target", &appautoscaling.TargetArgs{ 75 // MaxCapacity: pulumi.Int(100), 76 // MinCapacity: pulumi.Int(5), 77 // ResourceId: pulumi.String(fmt.Sprintf("table/%v/index/%v", example.Name, indexName)), 78 // ScalableDimension: pulumi.String("dynamodb:index:ReadCapacityUnits"), 79 // ServiceNamespace: pulumi.String("dynamodb"), 80 // }) 81 // if err != nil { 82 // return err 83 // } 84 // return nil 85 // }) 86 // } 87 // 88 // ``` 89 // <!--End PulumiCodeChooser --> 90 // 91 // ### ECS Service Autoscaling 92 // 93 // <!--Start PulumiCodeChooser --> 94 // ```go 95 // package main 96 // 97 // import ( 98 // 99 // "fmt" 100 // 101 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling" 102 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 103 // 104 // ) 105 // 106 // func main() { 107 // pulumi.Run(func(ctx *pulumi.Context) error { 108 // _, err := appautoscaling.NewTarget(ctx, "ecs_target", &appautoscaling.TargetArgs{ 109 // MaxCapacity: pulumi.Int(4), 110 // MinCapacity: pulumi.Int(1), 111 // ResourceId: pulumi.String(fmt.Sprintf("service/%v/%v", example.Name, exampleAwsEcsService.Name)), 112 // ScalableDimension: pulumi.String("ecs:service:DesiredCount"), 113 // ServiceNamespace: pulumi.String("ecs"), 114 // }) 115 // if err != nil { 116 // return err 117 // } 118 // return nil 119 // }) 120 // } 121 // 122 // ``` 123 // <!--End PulumiCodeChooser --> 124 // 125 // ### Aurora Read Replica Autoscaling 126 // 127 // <!--Start PulumiCodeChooser --> 128 // ```go 129 // package main 130 // 131 // import ( 132 // 133 // "fmt" 134 // 135 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling" 136 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 137 // 138 // ) 139 // 140 // func main() { 141 // pulumi.Run(func(ctx *pulumi.Context) error { 142 // _, err := appautoscaling.NewTarget(ctx, "replicas", &appautoscaling.TargetArgs{ 143 // ServiceNamespace: pulumi.String("rds"), 144 // ScalableDimension: pulumi.String("rds:cluster:ReadReplicaCount"), 145 // ResourceId: pulumi.String(fmt.Sprintf("cluster:%v", example.Id)), 146 // MinCapacity: pulumi.Int(1), 147 // MaxCapacity: pulumi.Int(15), 148 // }) 149 // if err != nil { 150 // return err 151 // } 152 // return nil 153 // }) 154 // } 155 // 156 // ``` 157 // <!--End PulumiCodeChooser --> 158 // 159 // ### Suppressing `tagsAll` Differences For Older Resources 160 // 161 // <!--Start PulumiCodeChooser --> 162 // ```go 163 // package main 164 // 165 // import ( 166 // 167 // "fmt" 168 // 169 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling" 170 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 171 // 172 // ) 173 // 174 // func main() { 175 // pulumi.Run(func(ctx *pulumi.Context) error { 176 // _, err := appautoscaling.NewTarget(ctx, "ecs_target", &appautoscaling.TargetArgs{ 177 // MaxCapacity: pulumi.Int(4), 178 // MinCapacity: pulumi.Int(1), 179 // ResourceId: pulumi.String(fmt.Sprintf("service/%v/%v", example.Name, exampleAwsEcsService.Name)), 180 // ScalableDimension: pulumi.String("ecs:service:DesiredCount"), 181 // ServiceNamespace: pulumi.String("ecs"), 182 // }) 183 // if err != nil { 184 // return err 185 // } 186 // return nil 187 // }) 188 // } 189 // 190 // ``` 191 // <!--End PulumiCodeChooser --> 192 // 193 // ### MSK / Kafka Autoscaling 194 // 195 // <!--Start PulumiCodeChooser --> 196 // ```go 197 // package main 198 // 199 // import ( 200 // 201 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/appautoscaling" 202 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 203 // 204 // ) 205 // 206 // func main() { 207 // pulumi.Run(func(ctx *pulumi.Context) error { 208 // _, err := appautoscaling.NewTarget(ctx, "msk_target", &appautoscaling.TargetArgs{ 209 // ServiceNamespace: pulumi.String("kafka"), 210 // ScalableDimension: pulumi.String("kafka:broker-storage:VolumeSize"), 211 // ResourceId: pulumi.Any(example.Arn), 212 // MinCapacity: pulumi.Int(1), 213 // MaxCapacity: pulumi.Int(8), 214 // }) 215 // if err != nil { 216 // return err 217 // } 218 // return nil 219 // }) 220 // } 221 // 222 // ``` 223 // <!--End PulumiCodeChooser --> 224 // 225 // ## Import 226 // 227 // Using `pulumi import`, import Application AutoScaling Target using the `service-namespace` , `resource-id` and `scalable-dimension` separated by `/`. For example: 228 // 229 // ```sh 230 // $ pulumi import aws:appautoscaling/target:Target test-target service-namespace/resource-id/scalable-dimension 231 // ``` 232 type Target struct { 233 pulumi.CustomResourceState 234 235 // The ARN of the scalable target. 236 Arn pulumi.StringOutput `pulumi:"arn"` 237 // Max capacity of the scalable target. 238 MaxCapacity pulumi.IntOutput `pulumi:"maxCapacity"` 239 // Min capacity of the scalable target. 240 MinCapacity pulumi.IntOutput `pulumi:"minCapacity"` 241 // Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 242 ResourceId pulumi.StringOutput `pulumi:"resourceId"` 243 // ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the [AWS Application Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM. 244 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 245 // Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 246 ScalableDimension pulumi.StringOutput `pulumi:"scalableDimension"` 247 // AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 248 ServiceNamespace pulumi.StringOutput `pulumi:"serviceNamespace"` 249 // Map of tags to assign to the scalable target. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 250 Tags pulumi.StringMapOutput `pulumi:"tags"` 251 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 252 // 253 // Deprecated: Please use `tags` instead. 254 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 255 } 256 257 // NewTarget registers a new resource with the given unique name, arguments, and options. 258 func NewTarget(ctx *pulumi.Context, 259 name string, args *TargetArgs, opts ...pulumi.ResourceOption) (*Target, error) { 260 if args == nil { 261 return nil, errors.New("missing one or more required arguments") 262 } 263 264 if args.MaxCapacity == nil { 265 return nil, errors.New("invalid value for required argument 'MaxCapacity'") 266 } 267 if args.MinCapacity == nil { 268 return nil, errors.New("invalid value for required argument 'MinCapacity'") 269 } 270 if args.ResourceId == nil { 271 return nil, errors.New("invalid value for required argument 'ResourceId'") 272 } 273 if args.ScalableDimension == nil { 274 return nil, errors.New("invalid value for required argument 'ScalableDimension'") 275 } 276 if args.ServiceNamespace == nil { 277 return nil, errors.New("invalid value for required argument 'ServiceNamespace'") 278 } 279 opts = internal.PkgResourceDefaultOpts(opts) 280 var resource Target 281 err := ctx.RegisterResource("aws:appautoscaling/target:Target", name, args, &resource, opts...) 282 if err != nil { 283 return nil, err 284 } 285 return &resource, nil 286 } 287 288 // GetTarget gets an existing Target resource's state with the given name, ID, and optional 289 // state properties that are used to uniquely qualify the lookup (nil if not required). 290 func GetTarget(ctx *pulumi.Context, 291 name string, id pulumi.IDInput, state *TargetState, opts ...pulumi.ResourceOption) (*Target, error) { 292 var resource Target 293 err := ctx.ReadResource("aws:appautoscaling/target:Target", name, id, state, &resource, opts...) 294 if err != nil { 295 return nil, err 296 } 297 return &resource, nil 298 } 299 300 // Input properties used for looking up and filtering Target resources. 301 type targetState struct { 302 // The ARN of the scalable target. 303 Arn *string `pulumi:"arn"` 304 // Max capacity of the scalable target. 305 MaxCapacity *int `pulumi:"maxCapacity"` 306 // Min capacity of the scalable target. 307 MinCapacity *int `pulumi:"minCapacity"` 308 // Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 309 ResourceId *string `pulumi:"resourceId"` 310 // ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the [AWS Application Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM. 311 RoleArn *string `pulumi:"roleArn"` 312 // Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 313 ScalableDimension *string `pulumi:"scalableDimension"` 314 // AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 315 ServiceNamespace *string `pulumi:"serviceNamespace"` 316 // Map of tags to assign to the scalable target. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 317 Tags map[string]string `pulumi:"tags"` 318 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 319 // 320 // Deprecated: Please use `tags` instead. 321 TagsAll map[string]string `pulumi:"tagsAll"` 322 } 323 324 type TargetState struct { 325 // The ARN of the scalable target. 326 Arn pulumi.StringPtrInput 327 // Max capacity of the scalable target. 328 MaxCapacity pulumi.IntPtrInput 329 // Min capacity of the scalable target. 330 MinCapacity pulumi.IntPtrInput 331 // Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 332 ResourceId pulumi.StringPtrInput 333 // ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the [AWS Application Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM. 334 RoleArn pulumi.StringPtrInput 335 // Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 336 ScalableDimension pulumi.StringPtrInput 337 // AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 338 ServiceNamespace pulumi.StringPtrInput 339 // Map of tags to assign to the scalable target. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 340 Tags pulumi.StringMapInput 341 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 342 // 343 // Deprecated: Please use `tags` instead. 344 TagsAll pulumi.StringMapInput 345 } 346 347 func (TargetState) ElementType() reflect.Type { 348 return reflect.TypeOf((*targetState)(nil)).Elem() 349 } 350 351 type targetArgs struct { 352 // Max capacity of the scalable target. 353 MaxCapacity int `pulumi:"maxCapacity"` 354 // Min capacity of the scalable target. 355 MinCapacity int `pulumi:"minCapacity"` 356 // Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 357 ResourceId string `pulumi:"resourceId"` 358 // ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the [AWS Application Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM. 359 RoleArn *string `pulumi:"roleArn"` 360 // Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 361 ScalableDimension string `pulumi:"scalableDimension"` 362 // AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 363 ServiceNamespace string `pulumi:"serviceNamespace"` 364 // Map of tags to assign to the scalable target. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 365 Tags map[string]string `pulumi:"tags"` 366 } 367 368 // The set of arguments for constructing a Target resource. 369 type TargetArgs struct { 370 // Max capacity of the scalable target. 371 MaxCapacity pulumi.IntInput 372 // Min capacity of the scalable target. 373 MinCapacity pulumi.IntInput 374 // Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 375 ResourceId pulumi.StringInput 376 // ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the [AWS Application Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM. 377 RoleArn pulumi.StringPtrInput 378 // Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 379 ScalableDimension pulumi.StringInput 380 // AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 381 ServiceNamespace pulumi.StringInput 382 // Map of tags to assign to the scalable target. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 383 Tags pulumi.StringMapInput 384 } 385 386 func (TargetArgs) ElementType() reflect.Type { 387 return reflect.TypeOf((*targetArgs)(nil)).Elem() 388 } 389 390 type TargetInput interface { 391 pulumi.Input 392 393 ToTargetOutput() TargetOutput 394 ToTargetOutputWithContext(ctx context.Context) TargetOutput 395 } 396 397 func (*Target) ElementType() reflect.Type { 398 return reflect.TypeOf((**Target)(nil)).Elem() 399 } 400 401 func (i *Target) ToTargetOutput() TargetOutput { 402 return i.ToTargetOutputWithContext(context.Background()) 403 } 404 405 func (i *Target) ToTargetOutputWithContext(ctx context.Context) TargetOutput { 406 return pulumi.ToOutputWithContext(ctx, i).(TargetOutput) 407 } 408 409 // TargetArrayInput is an input type that accepts TargetArray and TargetArrayOutput values. 410 // You can construct a concrete instance of `TargetArrayInput` via: 411 // 412 // TargetArray{ TargetArgs{...} } 413 type TargetArrayInput interface { 414 pulumi.Input 415 416 ToTargetArrayOutput() TargetArrayOutput 417 ToTargetArrayOutputWithContext(context.Context) TargetArrayOutput 418 } 419 420 type TargetArray []TargetInput 421 422 func (TargetArray) ElementType() reflect.Type { 423 return reflect.TypeOf((*[]*Target)(nil)).Elem() 424 } 425 426 func (i TargetArray) ToTargetArrayOutput() TargetArrayOutput { 427 return i.ToTargetArrayOutputWithContext(context.Background()) 428 } 429 430 func (i TargetArray) ToTargetArrayOutputWithContext(ctx context.Context) TargetArrayOutput { 431 return pulumi.ToOutputWithContext(ctx, i).(TargetArrayOutput) 432 } 433 434 // TargetMapInput is an input type that accepts TargetMap and TargetMapOutput values. 435 // You can construct a concrete instance of `TargetMapInput` via: 436 // 437 // TargetMap{ "key": TargetArgs{...} } 438 type TargetMapInput interface { 439 pulumi.Input 440 441 ToTargetMapOutput() TargetMapOutput 442 ToTargetMapOutputWithContext(context.Context) TargetMapOutput 443 } 444 445 type TargetMap map[string]TargetInput 446 447 func (TargetMap) ElementType() reflect.Type { 448 return reflect.TypeOf((*map[string]*Target)(nil)).Elem() 449 } 450 451 func (i TargetMap) ToTargetMapOutput() TargetMapOutput { 452 return i.ToTargetMapOutputWithContext(context.Background()) 453 } 454 455 func (i TargetMap) ToTargetMapOutputWithContext(ctx context.Context) TargetMapOutput { 456 return pulumi.ToOutputWithContext(ctx, i).(TargetMapOutput) 457 } 458 459 type TargetOutput struct{ *pulumi.OutputState } 460 461 func (TargetOutput) ElementType() reflect.Type { 462 return reflect.TypeOf((**Target)(nil)).Elem() 463 } 464 465 func (o TargetOutput) ToTargetOutput() TargetOutput { 466 return o 467 } 468 469 func (o TargetOutput) ToTargetOutputWithContext(ctx context.Context) TargetOutput { 470 return o 471 } 472 473 // The ARN of the scalable target. 474 func (o TargetOutput) Arn() pulumi.StringOutput { 475 return o.ApplyT(func(v *Target) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 476 } 477 478 // Max capacity of the scalable target. 479 func (o TargetOutput) MaxCapacity() pulumi.IntOutput { 480 return o.ApplyT(func(v *Target) pulumi.IntOutput { return v.MaxCapacity }).(pulumi.IntOutput) 481 } 482 483 // Min capacity of the scalable target. 484 func (o TargetOutput) MinCapacity() pulumi.IntOutput { 485 return o.ApplyT(func(v *Target) pulumi.IntOutput { return v.MinCapacity }).(pulumi.IntOutput) 486 } 487 488 // Resource type and unique identifier string for the resource associated with the scaling policy. Documentation can be found in the `ResourceId` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 489 func (o TargetOutput) ResourceId() pulumi.StringOutput { 490 return o.ApplyT(func(v *Target) pulumi.StringOutput { return v.ResourceId }).(pulumi.StringOutput) 491 } 492 493 // ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf. This defaults to an IAM Service-Linked Role for most services and custom IAM Roles are ignored by the API for those namespaces. See the [AWS Application Auto Scaling documentation](https://docs.aws.amazon.com/autoscaling/application/userguide/security_iam_service-with-iam.html#security_iam_service-with-iam-roles) for more information about how this service interacts with IAM. 494 func (o TargetOutput) RoleArn() pulumi.StringOutput { 495 return o.ApplyT(func(v *Target) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 496 } 497 498 // Scalable dimension of the scalable target. Documentation can be found in the `ScalableDimension` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 499 func (o TargetOutput) ScalableDimension() pulumi.StringOutput { 500 return o.ApplyT(func(v *Target) pulumi.StringOutput { return v.ScalableDimension }).(pulumi.StringOutput) 501 } 502 503 // AWS service namespace of the scalable target. Documentation can be found in the `ServiceNamespace` parameter at: [AWS Application Auto Scaling API Reference](https://docs.aws.amazon.com/autoscaling/application/APIReference/API_RegisterScalableTarget.html#API_RegisterScalableTarget_RequestParameters) 504 func (o TargetOutput) ServiceNamespace() pulumi.StringOutput { 505 return o.ApplyT(func(v *Target) pulumi.StringOutput { return v.ServiceNamespace }).(pulumi.StringOutput) 506 } 507 508 // Map of tags to assign to the scalable target. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 509 func (o TargetOutput) Tags() pulumi.StringMapOutput { 510 return o.ApplyT(func(v *Target) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 511 } 512 513 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 514 // 515 // Deprecated: Please use `tags` instead. 516 func (o TargetOutput) TagsAll() pulumi.StringMapOutput { 517 return o.ApplyT(func(v *Target) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 518 } 519 520 type TargetArrayOutput struct{ *pulumi.OutputState } 521 522 func (TargetArrayOutput) ElementType() reflect.Type { 523 return reflect.TypeOf((*[]*Target)(nil)).Elem() 524 } 525 526 func (o TargetArrayOutput) ToTargetArrayOutput() TargetArrayOutput { 527 return o 528 } 529 530 func (o TargetArrayOutput) ToTargetArrayOutputWithContext(ctx context.Context) TargetArrayOutput { 531 return o 532 } 533 534 func (o TargetArrayOutput) Index(i pulumi.IntInput) TargetOutput { 535 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Target { 536 return vs[0].([]*Target)[vs[1].(int)] 537 }).(TargetOutput) 538 } 539 540 type TargetMapOutput struct{ *pulumi.OutputState } 541 542 func (TargetMapOutput) ElementType() reflect.Type { 543 return reflect.TypeOf((*map[string]*Target)(nil)).Elem() 544 } 545 546 func (o TargetMapOutput) ToTargetMapOutput() TargetMapOutput { 547 return o 548 } 549 550 func (o TargetMapOutput) ToTargetMapOutputWithContext(ctx context.Context) TargetMapOutput { 551 return o 552 } 553 554 func (o TargetMapOutput) MapIndex(k pulumi.StringInput) TargetOutput { 555 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Target { 556 return vs[0].(map[string]*Target)[vs[1].(string)] 557 }).(TargetOutput) 558 } 559 560 func init() { 561 pulumi.RegisterInputType(reflect.TypeOf((*TargetInput)(nil)).Elem(), &Target{}) 562 pulumi.RegisterInputType(reflect.TypeOf((*TargetArrayInput)(nil)).Elem(), TargetArray{}) 563 pulumi.RegisterInputType(reflect.TypeOf((*TargetMapInput)(nil)).Elem(), TargetMap{}) 564 pulumi.RegisterOutputType(TargetOutput{}) 565 pulumi.RegisterOutputType(TargetArrayOutput{}) 566 pulumi.RegisterOutputType(TargetMapOutput{}) 567 }