github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/verifiedaccess/instance.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 verifiedaccess
     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  // Resource for managing a Verified Access Instance.
    15  //
    16  // ## Example Usage
    17  //
    18  // ### Basic
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/verifiedaccess"
    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 := verifiedaccess.NewInstance(ctx, "example", &verifiedaccess.InstanceArgs{
    34  //				Description: pulumi.String("example"),
    35  //				Tags: pulumi.StringMap{
    36  //					"Name": pulumi.String("example"),
    37  //				},
    38  //			})
    39  //			if err != nil {
    40  //				return err
    41  //			}
    42  //			return nil
    43  //		})
    44  //	}
    45  //
    46  // ```
    47  // <!--End PulumiCodeChooser -->
    48  //
    49  // ### With `fipsEnabled`
    50  //
    51  // <!--Start PulumiCodeChooser -->
    52  // ```go
    53  // package main
    54  //
    55  // import (
    56  //
    57  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/verifiedaccess"
    58  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    59  //
    60  // )
    61  //
    62  //	func main() {
    63  //		pulumi.Run(func(ctx *pulumi.Context) error {
    64  //			_, err := verifiedaccess.NewInstance(ctx, "example", &verifiedaccess.InstanceArgs{
    65  //				FipsEnabled: pulumi.Bool(true),
    66  //			})
    67  //			if err != nil {
    68  //				return err
    69  //			}
    70  //			return nil
    71  //		})
    72  //	}
    73  //
    74  // ```
    75  // <!--End PulumiCodeChooser -->
    76  //
    77  // ## Import
    78  //
    79  // Using `pulumi import`, import Verified Access Instances using the  `id`. For example:
    80  //
    81  // ```sh
    82  // $ pulumi import aws:verifiedaccess/instance:Instance example vai-1234567890abcdef0
    83  // ```
    84  type Instance struct {
    85  	pulumi.CustomResourceState
    86  
    87  	// The time that the Verified Access Instance was created.
    88  	CreationTime pulumi.StringOutput `pulumi:"creationTime"`
    89  	// A description for the AWS Verified Access Instance.
    90  	Description pulumi.StringPtrOutput `pulumi:"description"`
    91  	// Enable or disable support for Federal Information Processing Standards (FIPS) on the AWS Verified Access Instance.
    92  	FipsEnabled pulumi.BoolPtrOutput `pulumi:"fipsEnabled"`
    93  	// The time that the Verified Access Instance was last updated.
    94  	LastUpdatedTime pulumi.StringOutput `pulumi:"lastUpdatedTime"`
    95  	// 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.
    96  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    97  	// Deprecated: Please use `tags` instead.
    98  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    99  	// One or more blocks of providing information about the AWS Verified Access Trust Providers. See verifiedAccessTrustProviders below for details.One or more blocks
   100  	VerifiedAccessTrustProviders InstanceVerifiedAccessTrustProviderArrayOutput `pulumi:"verifiedAccessTrustProviders"`
   101  }
   102  
   103  // NewInstance registers a new resource with the given unique name, arguments, and options.
   104  func NewInstance(ctx *pulumi.Context,
   105  	name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error) {
   106  	if args == nil {
   107  		args = &InstanceArgs{}
   108  	}
   109  
   110  	opts = internal.PkgResourceDefaultOpts(opts)
   111  	var resource Instance
   112  	err := ctx.RegisterResource("aws:verifiedaccess/instance:Instance", name, args, &resource, opts...)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return &resource, nil
   117  }
   118  
   119  // GetInstance gets an existing Instance resource's state with the given name, ID, and optional
   120  // state properties that are used to uniquely qualify the lookup (nil if not required).
   121  func GetInstance(ctx *pulumi.Context,
   122  	name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error) {
   123  	var resource Instance
   124  	err := ctx.ReadResource("aws:verifiedaccess/instance:Instance", name, id, state, &resource, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return &resource, nil
   129  }
   130  
   131  // Input properties used for looking up and filtering Instance resources.
   132  type instanceState struct {
   133  	// The time that the Verified Access Instance was created.
   134  	CreationTime *string `pulumi:"creationTime"`
   135  	// A description for the AWS Verified Access Instance.
   136  	Description *string `pulumi:"description"`
   137  	// Enable or disable support for Federal Information Processing Standards (FIPS) on the AWS Verified Access Instance.
   138  	FipsEnabled *bool `pulumi:"fipsEnabled"`
   139  	// The time that the Verified Access Instance was last updated.
   140  	LastUpdatedTime *string `pulumi:"lastUpdatedTime"`
   141  	// 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.
   142  	Tags map[string]string `pulumi:"tags"`
   143  	// Deprecated: Please use `tags` instead.
   144  	TagsAll map[string]string `pulumi:"tagsAll"`
   145  	// One or more blocks of providing information about the AWS Verified Access Trust Providers. See verifiedAccessTrustProviders below for details.One or more blocks
   146  	VerifiedAccessTrustProviders []InstanceVerifiedAccessTrustProvider `pulumi:"verifiedAccessTrustProviders"`
   147  }
   148  
   149  type InstanceState struct {
   150  	// The time that the Verified Access Instance was created.
   151  	CreationTime pulumi.StringPtrInput
   152  	// A description for the AWS Verified Access Instance.
   153  	Description pulumi.StringPtrInput
   154  	// Enable or disable support for Federal Information Processing Standards (FIPS) on the AWS Verified Access Instance.
   155  	FipsEnabled pulumi.BoolPtrInput
   156  	// The time that the Verified Access Instance was last updated.
   157  	LastUpdatedTime pulumi.StringPtrInput
   158  	// 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.
   159  	Tags pulumi.StringMapInput
   160  	// Deprecated: Please use `tags` instead.
   161  	TagsAll pulumi.StringMapInput
   162  	// One or more blocks of providing information about the AWS Verified Access Trust Providers. See verifiedAccessTrustProviders below for details.One or more blocks
   163  	VerifiedAccessTrustProviders InstanceVerifiedAccessTrustProviderArrayInput
   164  }
   165  
   166  func (InstanceState) ElementType() reflect.Type {
   167  	return reflect.TypeOf((*instanceState)(nil)).Elem()
   168  }
   169  
   170  type instanceArgs struct {
   171  	// A description for the AWS Verified Access Instance.
   172  	Description *string `pulumi:"description"`
   173  	// Enable or disable support for Federal Information Processing Standards (FIPS) on the AWS Verified Access Instance.
   174  	FipsEnabled *bool `pulumi:"fipsEnabled"`
   175  	// 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.
   176  	Tags map[string]string `pulumi:"tags"`
   177  }
   178  
   179  // The set of arguments for constructing a Instance resource.
   180  type InstanceArgs struct {
   181  	// A description for the AWS Verified Access Instance.
   182  	Description pulumi.StringPtrInput
   183  	// Enable or disable support for Federal Information Processing Standards (FIPS) on the AWS Verified Access Instance.
   184  	FipsEnabled pulumi.BoolPtrInput
   185  	// 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.
   186  	Tags pulumi.StringMapInput
   187  }
   188  
   189  func (InstanceArgs) ElementType() reflect.Type {
   190  	return reflect.TypeOf((*instanceArgs)(nil)).Elem()
   191  }
   192  
   193  type InstanceInput interface {
   194  	pulumi.Input
   195  
   196  	ToInstanceOutput() InstanceOutput
   197  	ToInstanceOutputWithContext(ctx context.Context) InstanceOutput
   198  }
   199  
   200  func (*Instance) ElementType() reflect.Type {
   201  	return reflect.TypeOf((**Instance)(nil)).Elem()
   202  }
   203  
   204  func (i *Instance) ToInstanceOutput() InstanceOutput {
   205  	return i.ToInstanceOutputWithContext(context.Background())
   206  }
   207  
   208  func (i *Instance) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
   209  	return pulumi.ToOutputWithContext(ctx, i).(InstanceOutput)
   210  }
   211  
   212  // InstanceArrayInput is an input type that accepts InstanceArray and InstanceArrayOutput values.
   213  // You can construct a concrete instance of `InstanceArrayInput` via:
   214  //
   215  //	InstanceArray{ InstanceArgs{...} }
   216  type InstanceArrayInput interface {
   217  	pulumi.Input
   218  
   219  	ToInstanceArrayOutput() InstanceArrayOutput
   220  	ToInstanceArrayOutputWithContext(context.Context) InstanceArrayOutput
   221  }
   222  
   223  type InstanceArray []InstanceInput
   224  
   225  func (InstanceArray) ElementType() reflect.Type {
   226  	return reflect.TypeOf((*[]*Instance)(nil)).Elem()
   227  }
   228  
   229  func (i InstanceArray) ToInstanceArrayOutput() InstanceArrayOutput {
   230  	return i.ToInstanceArrayOutputWithContext(context.Background())
   231  }
   232  
   233  func (i InstanceArray) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
   234  	return pulumi.ToOutputWithContext(ctx, i).(InstanceArrayOutput)
   235  }
   236  
   237  // InstanceMapInput is an input type that accepts InstanceMap and InstanceMapOutput values.
   238  // You can construct a concrete instance of `InstanceMapInput` via:
   239  //
   240  //	InstanceMap{ "key": InstanceArgs{...} }
   241  type InstanceMapInput interface {
   242  	pulumi.Input
   243  
   244  	ToInstanceMapOutput() InstanceMapOutput
   245  	ToInstanceMapOutputWithContext(context.Context) InstanceMapOutput
   246  }
   247  
   248  type InstanceMap map[string]InstanceInput
   249  
   250  func (InstanceMap) ElementType() reflect.Type {
   251  	return reflect.TypeOf((*map[string]*Instance)(nil)).Elem()
   252  }
   253  
   254  func (i InstanceMap) ToInstanceMapOutput() InstanceMapOutput {
   255  	return i.ToInstanceMapOutputWithContext(context.Background())
   256  }
   257  
   258  func (i InstanceMap) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
   259  	return pulumi.ToOutputWithContext(ctx, i).(InstanceMapOutput)
   260  }
   261  
   262  type InstanceOutput struct{ *pulumi.OutputState }
   263  
   264  func (InstanceOutput) ElementType() reflect.Type {
   265  	return reflect.TypeOf((**Instance)(nil)).Elem()
   266  }
   267  
   268  func (o InstanceOutput) ToInstanceOutput() InstanceOutput {
   269  	return o
   270  }
   271  
   272  func (o InstanceOutput) ToInstanceOutputWithContext(ctx context.Context) InstanceOutput {
   273  	return o
   274  }
   275  
   276  // The time that the Verified Access Instance was created.
   277  func (o InstanceOutput) CreationTime() pulumi.StringOutput {
   278  	return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
   279  }
   280  
   281  // A description for the AWS Verified Access Instance.
   282  func (o InstanceOutput) Description() pulumi.StringPtrOutput {
   283  	return o.ApplyT(func(v *Instance) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   284  }
   285  
   286  // Enable or disable support for Federal Information Processing Standards (FIPS) on the AWS Verified Access Instance.
   287  func (o InstanceOutput) FipsEnabled() pulumi.BoolPtrOutput {
   288  	return o.ApplyT(func(v *Instance) pulumi.BoolPtrOutput { return v.FipsEnabled }).(pulumi.BoolPtrOutput)
   289  }
   290  
   291  // The time that the Verified Access Instance was last updated.
   292  func (o InstanceOutput) LastUpdatedTime() pulumi.StringOutput {
   293  	return o.ApplyT(func(v *Instance) pulumi.StringOutput { return v.LastUpdatedTime }).(pulumi.StringOutput)
   294  }
   295  
   296  // 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.
   297  func (o InstanceOutput) Tags() pulumi.StringMapOutput {
   298  	return o.ApplyT(func(v *Instance) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   299  }
   300  
   301  // Deprecated: Please use `tags` instead.
   302  func (o InstanceOutput) TagsAll() pulumi.StringMapOutput {
   303  	return o.ApplyT(func(v *Instance) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   304  }
   305  
   306  // One or more blocks of providing information about the AWS Verified Access Trust Providers. See verifiedAccessTrustProviders below for details.One or more blocks
   307  func (o InstanceOutput) VerifiedAccessTrustProviders() InstanceVerifiedAccessTrustProviderArrayOutput {
   308  	return o.ApplyT(func(v *Instance) InstanceVerifiedAccessTrustProviderArrayOutput {
   309  		return v.VerifiedAccessTrustProviders
   310  	}).(InstanceVerifiedAccessTrustProviderArrayOutput)
   311  }
   312  
   313  type InstanceArrayOutput struct{ *pulumi.OutputState }
   314  
   315  func (InstanceArrayOutput) ElementType() reflect.Type {
   316  	return reflect.TypeOf((*[]*Instance)(nil)).Elem()
   317  }
   318  
   319  func (o InstanceArrayOutput) ToInstanceArrayOutput() InstanceArrayOutput {
   320  	return o
   321  }
   322  
   323  func (o InstanceArrayOutput) ToInstanceArrayOutputWithContext(ctx context.Context) InstanceArrayOutput {
   324  	return o
   325  }
   326  
   327  func (o InstanceArrayOutput) Index(i pulumi.IntInput) InstanceOutput {
   328  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Instance {
   329  		return vs[0].([]*Instance)[vs[1].(int)]
   330  	}).(InstanceOutput)
   331  }
   332  
   333  type InstanceMapOutput struct{ *pulumi.OutputState }
   334  
   335  func (InstanceMapOutput) ElementType() reflect.Type {
   336  	return reflect.TypeOf((*map[string]*Instance)(nil)).Elem()
   337  }
   338  
   339  func (o InstanceMapOutput) ToInstanceMapOutput() InstanceMapOutput {
   340  	return o
   341  }
   342  
   343  func (o InstanceMapOutput) ToInstanceMapOutputWithContext(ctx context.Context) InstanceMapOutput {
   344  	return o
   345  }
   346  
   347  func (o InstanceMapOutput) MapIndex(k pulumi.StringInput) InstanceOutput {
   348  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Instance {
   349  		return vs[0].(map[string]*Instance)[vs[1].(string)]
   350  	}).(InstanceOutput)
   351  }
   352  
   353  func init() {
   354  	pulumi.RegisterInputType(reflect.TypeOf((*InstanceInput)(nil)).Elem(), &Instance{})
   355  	pulumi.RegisterInputType(reflect.TypeOf((*InstanceArrayInput)(nil)).Elem(), InstanceArray{})
   356  	pulumi.RegisterInputType(reflect.TypeOf((*InstanceMapInput)(nil)).Elem(), InstanceMap{})
   357  	pulumi.RegisterOutputType(InstanceOutput{})
   358  	pulumi.RegisterOutputType(InstanceArrayOutput{})
   359  	pulumi.RegisterOutputType(InstanceMapOutput{})
   360  }