github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/synthetics/group.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 synthetics
     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 a Synthetics Group resource.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/synthetics"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := synthetics.NewGroup(ctx, "example", &synthetics.GroupArgs{
    34  //				Name: pulumi.String("example"),
    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 CloudWatch Synthetics Group using the `name`. For example:
    49  //
    50  // ```sh
    51  // $ pulumi import aws:synthetics/group:Group example example
    52  // ```
    53  type Group struct {
    54  	pulumi.CustomResourceState
    55  
    56  	// ARN of the Group.
    57  	Arn pulumi.StringOutput `pulumi:"arn"`
    58  	// ID of the Group.
    59  	GroupId pulumi.StringOutput `pulumi:"groupId"`
    60  	// Name of the group.
    61  	//
    62  	// The following arguments are optional:
    63  	Name pulumi.StringOutput `pulumi:"name"`
    64  	// 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.
    65  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    66  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    67  	//
    68  	// Deprecated: Please use `tags` instead.
    69  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    70  }
    71  
    72  // NewGroup registers a new resource with the given unique name, arguments, and options.
    73  func NewGroup(ctx *pulumi.Context,
    74  	name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error) {
    75  	if args == nil {
    76  		args = &GroupArgs{}
    77  	}
    78  
    79  	opts = internal.PkgResourceDefaultOpts(opts)
    80  	var resource Group
    81  	err := ctx.RegisterResource("aws:synthetics/group:Group", name, args, &resource, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return &resource, nil
    86  }
    87  
    88  // GetGroup gets an existing Group 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 GetGroup(ctx *pulumi.Context,
    91  	name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error) {
    92  	var resource Group
    93  	err := ctx.ReadResource("aws:synthetics/group:Group", 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 Group resources.
   101  type groupState struct {
   102  	// ARN of the Group.
   103  	Arn *string `pulumi:"arn"`
   104  	// ID of the Group.
   105  	GroupId *string `pulumi:"groupId"`
   106  	// Name of the group.
   107  	//
   108  	// The following arguments are optional:
   109  	Name *string `pulumi:"name"`
   110  	// 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.
   111  	Tags map[string]string `pulumi:"tags"`
   112  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   113  	//
   114  	// Deprecated: Please use `tags` instead.
   115  	TagsAll map[string]string `pulumi:"tagsAll"`
   116  }
   117  
   118  type GroupState struct {
   119  	// ARN of the Group.
   120  	Arn pulumi.StringPtrInput
   121  	// ID of the Group.
   122  	GroupId pulumi.StringPtrInput
   123  	// Name of the group.
   124  	//
   125  	// The following arguments are optional:
   126  	Name pulumi.StringPtrInput
   127  	// 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.
   128  	Tags pulumi.StringMapInput
   129  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   130  	//
   131  	// Deprecated: Please use `tags` instead.
   132  	TagsAll pulumi.StringMapInput
   133  }
   134  
   135  func (GroupState) ElementType() reflect.Type {
   136  	return reflect.TypeOf((*groupState)(nil)).Elem()
   137  }
   138  
   139  type groupArgs struct {
   140  	// Name of the group.
   141  	//
   142  	// The following arguments are optional:
   143  	Name *string `pulumi:"name"`
   144  	// 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.
   145  	Tags map[string]string `pulumi:"tags"`
   146  }
   147  
   148  // The set of arguments for constructing a Group resource.
   149  type GroupArgs struct {
   150  	// Name of the group.
   151  	//
   152  	// The following arguments are optional:
   153  	Name pulumi.StringPtrInput
   154  	// 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.
   155  	Tags pulumi.StringMapInput
   156  }
   157  
   158  func (GroupArgs) ElementType() reflect.Type {
   159  	return reflect.TypeOf((*groupArgs)(nil)).Elem()
   160  }
   161  
   162  type GroupInput interface {
   163  	pulumi.Input
   164  
   165  	ToGroupOutput() GroupOutput
   166  	ToGroupOutputWithContext(ctx context.Context) GroupOutput
   167  }
   168  
   169  func (*Group) ElementType() reflect.Type {
   170  	return reflect.TypeOf((**Group)(nil)).Elem()
   171  }
   172  
   173  func (i *Group) ToGroupOutput() GroupOutput {
   174  	return i.ToGroupOutputWithContext(context.Background())
   175  }
   176  
   177  func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
   178  	return pulumi.ToOutputWithContext(ctx, i).(GroupOutput)
   179  }
   180  
   181  // GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values.
   182  // You can construct a concrete instance of `GroupArrayInput` via:
   183  //
   184  //	GroupArray{ GroupArgs{...} }
   185  type GroupArrayInput interface {
   186  	pulumi.Input
   187  
   188  	ToGroupArrayOutput() GroupArrayOutput
   189  	ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput
   190  }
   191  
   192  type GroupArray []GroupInput
   193  
   194  func (GroupArray) ElementType() reflect.Type {
   195  	return reflect.TypeOf((*[]*Group)(nil)).Elem()
   196  }
   197  
   198  func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput {
   199  	return i.ToGroupArrayOutputWithContext(context.Background())
   200  }
   201  
   202  func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
   203  	return pulumi.ToOutputWithContext(ctx, i).(GroupArrayOutput)
   204  }
   205  
   206  // GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values.
   207  // You can construct a concrete instance of `GroupMapInput` via:
   208  //
   209  //	GroupMap{ "key": GroupArgs{...} }
   210  type GroupMapInput interface {
   211  	pulumi.Input
   212  
   213  	ToGroupMapOutput() GroupMapOutput
   214  	ToGroupMapOutputWithContext(context.Context) GroupMapOutput
   215  }
   216  
   217  type GroupMap map[string]GroupInput
   218  
   219  func (GroupMap) ElementType() reflect.Type {
   220  	return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
   221  }
   222  
   223  func (i GroupMap) ToGroupMapOutput() GroupMapOutput {
   224  	return i.ToGroupMapOutputWithContext(context.Background())
   225  }
   226  
   227  func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
   228  	return pulumi.ToOutputWithContext(ctx, i).(GroupMapOutput)
   229  }
   230  
   231  type GroupOutput struct{ *pulumi.OutputState }
   232  
   233  func (GroupOutput) ElementType() reflect.Type {
   234  	return reflect.TypeOf((**Group)(nil)).Elem()
   235  }
   236  
   237  func (o GroupOutput) ToGroupOutput() GroupOutput {
   238  	return o
   239  }
   240  
   241  func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput {
   242  	return o
   243  }
   244  
   245  // ARN of the Group.
   246  func (o GroupOutput) Arn() pulumi.StringOutput {
   247  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   248  }
   249  
   250  // ID of the Group.
   251  func (o GroupOutput) GroupId() pulumi.StringOutput {
   252  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.GroupId }).(pulumi.StringOutput)
   253  }
   254  
   255  // Name of the group.
   256  //
   257  // The following arguments are optional:
   258  func (o GroupOutput) Name() pulumi.StringOutput {
   259  	return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   260  }
   261  
   262  // 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.
   263  func (o GroupOutput) Tags() pulumi.StringMapOutput {
   264  	return o.ApplyT(func(v *Group) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   265  }
   266  
   267  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   268  //
   269  // Deprecated: Please use `tags` instead.
   270  func (o GroupOutput) TagsAll() pulumi.StringMapOutput {
   271  	return o.ApplyT(func(v *Group) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   272  }
   273  
   274  type GroupArrayOutput struct{ *pulumi.OutputState }
   275  
   276  func (GroupArrayOutput) ElementType() reflect.Type {
   277  	return reflect.TypeOf((*[]*Group)(nil)).Elem()
   278  }
   279  
   280  func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput {
   281  	return o
   282  }
   283  
   284  func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput {
   285  	return o
   286  }
   287  
   288  func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput {
   289  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Group {
   290  		return vs[0].([]*Group)[vs[1].(int)]
   291  	}).(GroupOutput)
   292  }
   293  
   294  type GroupMapOutput struct{ *pulumi.OutputState }
   295  
   296  func (GroupMapOutput) ElementType() reflect.Type {
   297  	return reflect.TypeOf((*map[string]*Group)(nil)).Elem()
   298  }
   299  
   300  func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput {
   301  	return o
   302  }
   303  
   304  func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput {
   305  	return o
   306  }
   307  
   308  func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput {
   309  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Group {
   310  		return vs[0].(map[string]*Group)[vs[1].(string)]
   311  	}).(GroupOutput)
   312  }
   313  
   314  func init() {
   315  	pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), &Group{})
   316  	pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{})
   317  	pulumi.RegisterInputType(reflect.TypeOf((*GroupMapInput)(nil)).Elem(), GroupMap{})
   318  	pulumi.RegisterOutputType(GroupOutput{})
   319  	pulumi.RegisterOutputType(GroupArrayOutput{})
   320  	pulumi.RegisterOutputType(GroupMapOutput{})
   321  }