github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/finspace/kxScalingGroup.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 finspace
     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  // Resource for managing an AWS FinSpace Kx Scaling Group.
    16  //
    17  // ## Example Usage
    18  //
    19  // ### Basic Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/finspace"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := finspace.NewKxScalingGroup(ctx, "example", &finspace.KxScalingGroupArgs{
    35  //				Name:               pulumi.String("my-tf-kx-scalinggroup"),
    36  //				EnvironmentId:      pulumi.Any(exampleAwsFinspaceKxEnvironment.Id),
    37  //				AvailabilityZoneId: pulumi.String("use1-az2"),
    38  //				HostType:           pulumi.String("kx.sg.4xlarge"),
    39  //			})
    40  //			if err != nil {
    41  //				return err
    42  //			}
    43  //			return nil
    44  //		})
    45  //	}
    46  //
    47  // ```
    48  // <!--End PulumiCodeChooser -->
    49  //
    50  // ## Import
    51  //
    52  // Using `pulumi import`, import an AWS FinSpace Kx Scaling Group using the `id` (environment ID and scaling group name, comma-delimited). For example:
    53  //
    54  // ```sh
    55  // $ pulumi import aws:finspace/kxScalingGroup:KxScalingGroup example n3ceo7wqxoxcti5tujqwzs,my-tf-kx-scalinggroup
    56  // ```
    57  type KxScalingGroup struct {
    58  	pulumi.CustomResourceState
    59  
    60  	// Amazon Resource Name (ARN) identifier of the KX Scaling Group.
    61  	Arn pulumi.StringOutput `pulumi:"arn"`
    62  	// The availability zone identifiers for the requested regions.
    63  	AvailabilityZoneId pulumi.StringOutput `pulumi:"availabilityZoneId"`
    64  	// The list of Managed kdb clusters that are currently active in the given scaling group.
    65  	Clusters pulumi.StringArrayOutput `pulumi:"clusters"`
    66  	// The timestamp at which the scaling group was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
    67  	CreatedTimestamp pulumi.StringOutput `pulumi:"createdTimestamp"`
    68  	// A unique identifier for the kdb environment, where you want to create the scaling group.
    69  	EnvironmentId pulumi.StringOutput `pulumi:"environmentId"`
    70  	// The memory and CPU capabilities of the scaling group host on which FinSpace Managed kdb clusters will be placed.
    71  	//
    72  	// The following arguments are optional:
    73  	HostType pulumi.StringOutput `pulumi:"hostType"`
    74  	// Last timestamp at which the scaling group was updated in FinSpace. Value determined as epoch time in seconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000.
    75  	LastModifiedTimestamp pulumi.StringOutput `pulumi:"lastModifiedTimestamp"`
    76  	// Unique name for the scaling group that you want to create.
    77  	Name pulumi.StringOutput `pulumi:"name"`
    78  	// The status of scaling group.
    79  	Status pulumi.StringOutput `pulumi:"status"`
    80  	// The error message when a failed state occurs.
    81  	StatusReason pulumi.StringOutput `pulumi:"statusReason"`
    82  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. You can add up to 50 tags to a scaling group.
    83  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    84  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    85  	//
    86  	// Deprecated: Please use `tags` instead.
    87  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    88  }
    89  
    90  // NewKxScalingGroup registers a new resource with the given unique name, arguments, and options.
    91  func NewKxScalingGroup(ctx *pulumi.Context,
    92  	name string, args *KxScalingGroupArgs, opts ...pulumi.ResourceOption) (*KxScalingGroup, error) {
    93  	if args == nil {
    94  		return nil, errors.New("missing one or more required arguments")
    95  	}
    96  
    97  	if args.AvailabilityZoneId == nil {
    98  		return nil, errors.New("invalid value for required argument 'AvailabilityZoneId'")
    99  	}
   100  	if args.EnvironmentId == nil {
   101  		return nil, errors.New("invalid value for required argument 'EnvironmentId'")
   102  	}
   103  	if args.HostType == nil {
   104  		return nil, errors.New("invalid value for required argument 'HostType'")
   105  	}
   106  	opts = internal.PkgResourceDefaultOpts(opts)
   107  	var resource KxScalingGroup
   108  	err := ctx.RegisterResource("aws:finspace/kxScalingGroup:KxScalingGroup", name, args, &resource, opts...)
   109  	if err != nil {
   110  		return nil, err
   111  	}
   112  	return &resource, nil
   113  }
   114  
   115  // GetKxScalingGroup gets an existing KxScalingGroup resource's state with the given name, ID, and optional
   116  // state properties that are used to uniquely qualify the lookup (nil if not required).
   117  func GetKxScalingGroup(ctx *pulumi.Context,
   118  	name string, id pulumi.IDInput, state *KxScalingGroupState, opts ...pulumi.ResourceOption) (*KxScalingGroup, error) {
   119  	var resource KxScalingGroup
   120  	err := ctx.ReadResource("aws:finspace/kxScalingGroup:KxScalingGroup", name, id, state, &resource, opts...)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	return &resource, nil
   125  }
   126  
   127  // Input properties used for looking up and filtering KxScalingGroup resources.
   128  type kxScalingGroupState struct {
   129  	// Amazon Resource Name (ARN) identifier of the KX Scaling Group.
   130  	Arn *string `pulumi:"arn"`
   131  	// The availability zone identifiers for the requested regions.
   132  	AvailabilityZoneId *string `pulumi:"availabilityZoneId"`
   133  	// The list of Managed kdb clusters that are currently active in the given scaling group.
   134  	Clusters []string `pulumi:"clusters"`
   135  	// The timestamp at which the scaling group was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
   136  	CreatedTimestamp *string `pulumi:"createdTimestamp"`
   137  	// A unique identifier for the kdb environment, where you want to create the scaling group.
   138  	EnvironmentId *string `pulumi:"environmentId"`
   139  	// The memory and CPU capabilities of the scaling group host on which FinSpace Managed kdb clusters will be placed.
   140  	//
   141  	// The following arguments are optional:
   142  	HostType *string `pulumi:"hostType"`
   143  	// Last timestamp at which the scaling group was updated in FinSpace. Value determined as epoch time in seconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000.
   144  	LastModifiedTimestamp *string `pulumi:"lastModifiedTimestamp"`
   145  	// Unique name for the scaling group that you want to create.
   146  	Name *string `pulumi:"name"`
   147  	// The status of scaling group.
   148  	Status *string `pulumi:"status"`
   149  	// The error message when a failed state occurs.
   150  	StatusReason *string `pulumi:"statusReason"`
   151  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. You can add up to 50 tags to a scaling group.
   152  	Tags map[string]string `pulumi:"tags"`
   153  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   154  	//
   155  	// Deprecated: Please use `tags` instead.
   156  	TagsAll map[string]string `pulumi:"tagsAll"`
   157  }
   158  
   159  type KxScalingGroupState struct {
   160  	// Amazon Resource Name (ARN) identifier of the KX Scaling Group.
   161  	Arn pulumi.StringPtrInput
   162  	// The availability zone identifiers for the requested regions.
   163  	AvailabilityZoneId pulumi.StringPtrInput
   164  	// The list of Managed kdb clusters that are currently active in the given scaling group.
   165  	Clusters pulumi.StringArrayInput
   166  	// The timestamp at which the scaling group was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
   167  	CreatedTimestamp pulumi.StringPtrInput
   168  	// A unique identifier for the kdb environment, where you want to create the scaling group.
   169  	EnvironmentId pulumi.StringPtrInput
   170  	// The memory and CPU capabilities of the scaling group host on which FinSpace Managed kdb clusters will be placed.
   171  	//
   172  	// The following arguments are optional:
   173  	HostType pulumi.StringPtrInput
   174  	// Last timestamp at which the scaling group was updated in FinSpace. Value determined as epoch time in seconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000.
   175  	LastModifiedTimestamp pulumi.StringPtrInput
   176  	// Unique name for the scaling group that you want to create.
   177  	Name pulumi.StringPtrInput
   178  	// The status of scaling group.
   179  	Status pulumi.StringPtrInput
   180  	// The error message when a failed state occurs.
   181  	StatusReason pulumi.StringPtrInput
   182  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. You can add up to 50 tags to a scaling group.
   183  	Tags pulumi.StringMapInput
   184  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   185  	//
   186  	// Deprecated: Please use `tags` instead.
   187  	TagsAll pulumi.StringMapInput
   188  }
   189  
   190  func (KxScalingGroupState) ElementType() reflect.Type {
   191  	return reflect.TypeOf((*kxScalingGroupState)(nil)).Elem()
   192  }
   193  
   194  type kxScalingGroupArgs struct {
   195  	// The availability zone identifiers for the requested regions.
   196  	AvailabilityZoneId string `pulumi:"availabilityZoneId"`
   197  	// A unique identifier for the kdb environment, where you want to create the scaling group.
   198  	EnvironmentId string `pulumi:"environmentId"`
   199  	// The memory and CPU capabilities of the scaling group host on which FinSpace Managed kdb clusters will be placed.
   200  	//
   201  	// The following arguments are optional:
   202  	HostType string `pulumi:"hostType"`
   203  	// Unique name for the scaling group that you want to create.
   204  	Name *string `pulumi:"name"`
   205  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. You can add up to 50 tags to a scaling group.
   206  	Tags map[string]string `pulumi:"tags"`
   207  }
   208  
   209  // The set of arguments for constructing a KxScalingGroup resource.
   210  type KxScalingGroupArgs struct {
   211  	// The availability zone identifiers for the requested regions.
   212  	AvailabilityZoneId pulumi.StringInput
   213  	// A unique identifier for the kdb environment, where you want to create the scaling group.
   214  	EnvironmentId pulumi.StringInput
   215  	// The memory and CPU capabilities of the scaling group host on which FinSpace Managed kdb clusters will be placed.
   216  	//
   217  	// The following arguments are optional:
   218  	HostType pulumi.StringInput
   219  	// Unique name for the scaling group that you want to create.
   220  	Name pulumi.StringPtrInput
   221  	// Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. You can add up to 50 tags to a scaling group.
   222  	Tags pulumi.StringMapInput
   223  }
   224  
   225  func (KxScalingGroupArgs) ElementType() reflect.Type {
   226  	return reflect.TypeOf((*kxScalingGroupArgs)(nil)).Elem()
   227  }
   228  
   229  type KxScalingGroupInput interface {
   230  	pulumi.Input
   231  
   232  	ToKxScalingGroupOutput() KxScalingGroupOutput
   233  	ToKxScalingGroupOutputWithContext(ctx context.Context) KxScalingGroupOutput
   234  }
   235  
   236  func (*KxScalingGroup) ElementType() reflect.Type {
   237  	return reflect.TypeOf((**KxScalingGroup)(nil)).Elem()
   238  }
   239  
   240  func (i *KxScalingGroup) ToKxScalingGroupOutput() KxScalingGroupOutput {
   241  	return i.ToKxScalingGroupOutputWithContext(context.Background())
   242  }
   243  
   244  func (i *KxScalingGroup) ToKxScalingGroupOutputWithContext(ctx context.Context) KxScalingGroupOutput {
   245  	return pulumi.ToOutputWithContext(ctx, i).(KxScalingGroupOutput)
   246  }
   247  
   248  // KxScalingGroupArrayInput is an input type that accepts KxScalingGroupArray and KxScalingGroupArrayOutput values.
   249  // You can construct a concrete instance of `KxScalingGroupArrayInput` via:
   250  //
   251  //	KxScalingGroupArray{ KxScalingGroupArgs{...} }
   252  type KxScalingGroupArrayInput interface {
   253  	pulumi.Input
   254  
   255  	ToKxScalingGroupArrayOutput() KxScalingGroupArrayOutput
   256  	ToKxScalingGroupArrayOutputWithContext(context.Context) KxScalingGroupArrayOutput
   257  }
   258  
   259  type KxScalingGroupArray []KxScalingGroupInput
   260  
   261  func (KxScalingGroupArray) ElementType() reflect.Type {
   262  	return reflect.TypeOf((*[]*KxScalingGroup)(nil)).Elem()
   263  }
   264  
   265  func (i KxScalingGroupArray) ToKxScalingGroupArrayOutput() KxScalingGroupArrayOutput {
   266  	return i.ToKxScalingGroupArrayOutputWithContext(context.Background())
   267  }
   268  
   269  func (i KxScalingGroupArray) ToKxScalingGroupArrayOutputWithContext(ctx context.Context) KxScalingGroupArrayOutput {
   270  	return pulumi.ToOutputWithContext(ctx, i).(KxScalingGroupArrayOutput)
   271  }
   272  
   273  // KxScalingGroupMapInput is an input type that accepts KxScalingGroupMap and KxScalingGroupMapOutput values.
   274  // You can construct a concrete instance of `KxScalingGroupMapInput` via:
   275  //
   276  //	KxScalingGroupMap{ "key": KxScalingGroupArgs{...} }
   277  type KxScalingGroupMapInput interface {
   278  	pulumi.Input
   279  
   280  	ToKxScalingGroupMapOutput() KxScalingGroupMapOutput
   281  	ToKxScalingGroupMapOutputWithContext(context.Context) KxScalingGroupMapOutput
   282  }
   283  
   284  type KxScalingGroupMap map[string]KxScalingGroupInput
   285  
   286  func (KxScalingGroupMap) ElementType() reflect.Type {
   287  	return reflect.TypeOf((*map[string]*KxScalingGroup)(nil)).Elem()
   288  }
   289  
   290  func (i KxScalingGroupMap) ToKxScalingGroupMapOutput() KxScalingGroupMapOutput {
   291  	return i.ToKxScalingGroupMapOutputWithContext(context.Background())
   292  }
   293  
   294  func (i KxScalingGroupMap) ToKxScalingGroupMapOutputWithContext(ctx context.Context) KxScalingGroupMapOutput {
   295  	return pulumi.ToOutputWithContext(ctx, i).(KxScalingGroupMapOutput)
   296  }
   297  
   298  type KxScalingGroupOutput struct{ *pulumi.OutputState }
   299  
   300  func (KxScalingGroupOutput) ElementType() reflect.Type {
   301  	return reflect.TypeOf((**KxScalingGroup)(nil)).Elem()
   302  }
   303  
   304  func (o KxScalingGroupOutput) ToKxScalingGroupOutput() KxScalingGroupOutput {
   305  	return o
   306  }
   307  
   308  func (o KxScalingGroupOutput) ToKxScalingGroupOutputWithContext(ctx context.Context) KxScalingGroupOutput {
   309  	return o
   310  }
   311  
   312  // Amazon Resource Name (ARN) identifier of the KX Scaling Group.
   313  func (o KxScalingGroupOutput) Arn() pulumi.StringOutput {
   314  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   315  }
   316  
   317  // The availability zone identifiers for the requested regions.
   318  func (o KxScalingGroupOutput) AvailabilityZoneId() pulumi.StringOutput {
   319  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.AvailabilityZoneId }).(pulumi.StringOutput)
   320  }
   321  
   322  // The list of Managed kdb clusters that are currently active in the given scaling group.
   323  func (o KxScalingGroupOutput) Clusters() pulumi.StringArrayOutput {
   324  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringArrayOutput { return v.Clusters }).(pulumi.StringArrayOutput)
   325  }
   326  
   327  // The timestamp at which the scaling group was created in FinSpace. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
   328  func (o KxScalingGroupOutput) CreatedTimestamp() pulumi.StringOutput {
   329  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.CreatedTimestamp }).(pulumi.StringOutput)
   330  }
   331  
   332  // A unique identifier for the kdb environment, where you want to create the scaling group.
   333  func (o KxScalingGroupOutput) EnvironmentId() pulumi.StringOutput {
   334  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.EnvironmentId }).(pulumi.StringOutput)
   335  }
   336  
   337  // The memory and CPU capabilities of the scaling group host on which FinSpace Managed kdb clusters will be placed.
   338  //
   339  // The following arguments are optional:
   340  func (o KxScalingGroupOutput) HostType() pulumi.StringOutput {
   341  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.HostType }).(pulumi.StringOutput)
   342  }
   343  
   344  // Last timestamp at which the scaling group was updated in FinSpace. Value determined as epoch time in seconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000.
   345  func (o KxScalingGroupOutput) LastModifiedTimestamp() pulumi.StringOutput {
   346  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.LastModifiedTimestamp }).(pulumi.StringOutput)
   347  }
   348  
   349  // Unique name for the scaling group that you want to create.
   350  func (o KxScalingGroupOutput) Name() pulumi.StringOutput {
   351  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   352  }
   353  
   354  // The status of scaling group.
   355  func (o KxScalingGroupOutput) Status() pulumi.StringOutput {
   356  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
   357  }
   358  
   359  // The error message when a failed state occurs.
   360  func (o KxScalingGroupOutput) StatusReason() pulumi.StringOutput {
   361  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringOutput { return v.StatusReason }).(pulumi.StringOutput)
   362  }
   363  
   364  // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. You can add up to 50 tags to a scaling group.
   365  func (o KxScalingGroupOutput) Tags() pulumi.StringMapOutput {
   366  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   367  }
   368  
   369  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   370  //
   371  // Deprecated: Please use `tags` instead.
   372  func (o KxScalingGroupOutput) TagsAll() pulumi.StringMapOutput {
   373  	return o.ApplyT(func(v *KxScalingGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   374  }
   375  
   376  type KxScalingGroupArrayOutput struct{ *pulumi.OutputState }
   377  
   378  func (KxScalingGroupArrayOutput) ElementType() reflect.Type {
   379  	return reflect.TypeOf((*[]*KxScalingGroup)(nil)).Elem()
   380  }
   381  
   382  func (o KxScalingGroupArrayOutput) ToKxScalingGroupArrayOutput() KxScalingGroupArrayOutput {
   383  	return o
   384  }
   385  
   386  func (o KxScalingGroupArrayOutput) ToKxScalingGroupArrayOutputWithContext(ctx context.Context) KxScalingGroupArrayOutput {
   387  	return o
   388  }
   389  
   390  func (o KxScalingGroupArrayOutput) Index(i pulumi.IntInput) KxScalingGroupOutput {
   391  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *KxScalingGroup {
   392  		return vs[0].([]*KxScalingGroup)[vs[1].(int)]
   393  	}).(KxScalingGroupOutput)
   394  }
   395  
   396  type KxScalingGroupMapOutput struct{ *pulumi.OutputState }
   397  
   398  func (KxScalingGroupMapOutput) ElementType() reflect.Type {
   399  	return reflect.TypeOf((*map[string]*KxScalingGroup)(nil)).Elem()
   400  }
   401  
   402  func (o KxScalingGroupMapOutput) ToKxScalingGroupMapOutput() KxScalingGroupMapOutput {
   403  	return o
   404  }
   405  
   406  func (o KxScalingGroupMapOutput) ToKxScalingGroupMapOutputWithContext(ctx context.Context) KxScalingGroupMapOutput {
   407  	return o
   408  }
   409  
   410  func (o KxScalingGroupMapOutput) MapIndex(k pulumi.StringInput) KxScalingGroupOutput {
   411  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *KxScalingGroup {
   412  		return vs[0].(map[string]*KxScalingGroup)[vs[1].(string)]
   413  	}).(KxScalingGroupOutput)
   414  }
   415  
   416  func init() {
   417  	pulumi.RegisterInputType(reflect.TypeOf((*KxScalingGroupInput)(nil)).Elem(), &KxScalingGroup{})
   418  	pulumi.RegisterInputType(reflect.TypeOf((*KxScalingGroupArrayInput)(nil)).Elem(), KxScalingGroupArray{})
   419  	pulumi.RegisterInputType(reflect.TypeOf((*KxScalingGroupMapInput)(nil)).Elem(), KxScalingGroupMap{})
   420  	pulumi.RegisterOutputType(KxScalingGroupOutput{})
   421  	pulumi.RegisterOutputType(KxScalingGroupArrayOutput{})
   422  	pulumi.RegisterOutputType(KxScalingGroupMapOutput{})
   423  }