github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/apigateway/clientCertificate.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 apigateway
     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 an API Gateway Client Certificate.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := apigateway.NewClientCertificate(ctx, "demo", &apigateway.ClientCertificateArgs{
    32  //				Description: pulumi.String("My client certificate"),
    33  //			})
    34  //			if err != nil {
    35  //				return err
    36  //			}
    37  //			return nil
    38  //		})
    39  //	}
    40  //
    41  // ```
    42  // <!--End PulumiCodeChooser -->
    43  //
    44  // ## Import
    45  //
    46  // Using `pulumi import`, import API Gateway Client Certificates using the id. For example:
    47  //
    48  // ```sh
    49  // $ pulumi import aws:apigateway/clientCertificate:ClientCertificate demo ab1cqe
    50  // ```
    51  type ClientCertificate struct {
    52  	pulumi.CustomResourceState
    53  
    54  	// ARN
    55  	Arn pulumi.StringOutput `pulumi:"arn"`
    56  	// Date when the client certificate was created.
    57  	CreatedDate pulumi.StringOutput `pulumi:"createdDate"`
    58  	// Description of the client certificate.
    59  	Description pulumi.StringPtrOutput `pulumi:"description"`
    60  	// Date when the client certificate will expire.
    61  	ExpirationDate pulumi.StringOutput `pulumi:"expirationDate"`
    62  	// The PEM-encoded public key of the client certificate.
    63  	PemEncodedCertificate pulumi.StringOutput `pulumi:"pemEncodedCertificate"`
    64  	// Key-value map 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  	// 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  // NewClientCertificate registers a new resource with the given unique name, arguments, and options.
    73  func NewClientCertificate(ctx *pulumi.Context,
    74  	name string, args *ClientCertificateArgs, opts ...pulumi.ResourceOption) (*ClientCertificate, error) {
    75  	if args == nil {
    76  		args = &ClientCertificateArgs{}
    77  	}
    78  
    79  	opts = internal.PkgResourceDefaultOpts(opts)
    80  	var resource ClientCertificate
    81  	err := ctx.RegisterResource("aws:apigateway/clientCertificate:ClientCertificate", name, args, &resource, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return &resource, nil
    86  }
    87  
    88  // GetClientCertificate gets an existing ClientCertificate 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 GetClientCertificate(ctx *pulumi.Context,
    91  	name string, id pulumi.IDInput, state *ClientCertificateState, opts ...pulumi.ResourceOption) (*ClientCertificate, error) {
    92  	var resource ClientCertificate
    93  	err := ctx.ReadResource("aws:apigateway/clientCertificate:ClientCertificate", 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 ClientCertificate resources.
   101  type clientCertificateState struct {
   102  	// ARN
   103  	Arn *string `pulumi:"arn"`
   104  	// Date when the client certificate was created.
   105  	CreatedDate *string `pulumi:"createdDate"`
   106  	// Description of the client certificate.
   107  	Description *string `pulumi:"description"`
   108  	// Date when the client certificate will expire.
   109  	ExpirationDate *string `pulumi:"expirationDate"`
   110  	// The PEM-encoded public key of the client certificate.
   111  	PemEncodedCertificate *string `pulumi:"pemEncodedCertificate"`
   112  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   113  	Tags map[string]string `pulumi:"tags"`
   114  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   115  	//
   116  	// Deprecated: Please use `tags` instead.
   117  	TagsAll map[string]string `pulumi:"tagsAll"`
   118  }
   119  
   120  type ClientCertificateState struct {
   121  	// ARN
   122  	Arn pulumi.StringPtrInput
   123  	// Date when the client certificate was created.
   124  	CreatedDate pulumi.StringPtrInput
   125  	// Description of the client certificate.
   126  	Description pulumi.StringPtrInput
   127  	// Date when the client certificate will expire.
   128  	ExpirationDate pulumi.StringPtrInput
   129  	// The PEM-encoded public key of the client certificate.
   130  	PemEncodedCertificate pulumi.StringPtrInput
   131  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   132  	Tags pulumi.StringMapInput
   133  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   134  	//
   135  	// Deprecated: Please use `tags` instead.
   136  	TagsAll pulumi.StringMapInput
   137  }
   138  
   139  func (ClientCertificateState) ElementType() reflect.Type {
   140  	return reflect.TypeOf((*clientCertificateState)(nil)).Elem()
   141  }
   142  
   143  type clientCertificateArgs struct {
   144  	// Description of the client certificate.
   145  	Description *string `pulumi:"description"`
   146  	// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   147  	Tags map[string]string `pulumi:"tags"`
   148  }
   149  
   150  // The set of arguments for constructing a ClientCertificate resource.
   151  type ClientCertificateArgs struct {
   152  	// Description of the client certificate.
   153  	Description pulumi.StringPtrInput
   154  	// Key-value map 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 (ClientCertificateArgs) ElementType() reflect.Type {
   159  	return reflect.TypeOf((*clientCertificateArgs)(nil)).Elem()
   160  }
   161  
   162  type ClientCertificateInput interface {
   163  	pulumi.Input
   164  
   165  	ToClientCertificateOutput() ClientCertificateOutput
   166  	ToClientCertificateOutputWithContext(ctx context.Context) ClientCertificateOutput
   167  }
   168  
   169  func (*ClientCertificate) ElementType() reflect.Type {
   170  	return reflect.TypeOf((**ClientCertificate)(nil)).Elem()
   171  }
   172  
   173  func (i *ClientCertificate) ToClientCertificateOutput() ClientCertificateOutput {
   174  	return i.ToClientCertificateOutputWithContext(context.Background())
   175  }
   176  
   177  func (i *ClientCertificate) ToClientCertificateOutputWithContext(ctx context.Context) ClientCertificateOutput {
   178  	return pulumi.ToOutputWithContext(ctx, i).(ClientCertificateOutput)
   179  }
   180  
   181  // ClientCertificateArrayInput is an input type that accepts ClientCertificateArray and ClientCertificateArrayOutput values.
   182  // You can construct a concrete instance of `ClientCertificateArrayInput` via:
   183  //
   184  //	ClientCertificateArray{ ClientCertificateArgs{...} }
   185  type ClientCertificateArrayInput interface {
   186  	pulumi.Input
   187  
   188  	ToClientCertificateArrayOutput() ClientCertificateArrayOutput
   189  	ToClientCertificateArrayOutputWithContext(context.Context) ClientCertificateArrayOutput
   190  }
   191  
   192  type ClientCertificateArray []ClientCertificateInput
   193  
   194  func (ClientCertificateArray) ElementType() reflect.Type {
   195  	return reflect.TypeOf((*[]*ClientCertificate)(nil)).Elem()
   196  }
   197  
   198  func (i ClientCertificateArray) ToClientCertificateArrayOutput() ClientCertificateArrayOutput {
   199  	return i.ToClientCertificateArrayOutputWithContext(context.Background())
   200  }
   201  
   202  func (i ClientCertificateArray) ToClientCertificateArrayOutputWithContext(ctx context.Context) ClientCertificateArrayOutput {
   203  	return pulumi.ToOutputWithContext(ctx, i).(ClientCertificateArrayOutput)
   204  }
   205  
   206  // ClientCertificateMapInput is an input type that accepts ClientCertificateMap and ClientCertificateMapOutput values.
   207  // You can construct a concrete instance of `ClientCertificateMapInput` via:
   208  //
   209  //	ClientCertificateMap{ "key": ClientCertificateArgs{...} }
   210  type ClientCertificateMapInput interface {
   211  	pulumi.Input
   212  
   213  	ToClientCertificateMapOutput() ClientCertificateMapOutput
   214  	ToClientCertificateMapOutputWithContext(context.Context) ClientCertificateMapOutput
   215  }
   216  
   217  type ClientCertificateMap map[string]ClientCertificateInput
   218  
   219  func (ClientCertificateMap) ElementType() reflect.Type {
   220  	return reflect.TypeOf((*map[string]*ClientCertificate)(nil)).Elem()
   221  }
   222  
   223  func (i ClientCertificateMap) ToClientCertificateMapOutput() ClientCertificateMapOutput {
   224  	return i.ToClientCertificateMapOutputWithContext(context.Background())
   225  }
   226  
   227  func (i ClientCertificateMap) ToClientCertificateMapOutputWithContext(ctx context.Context) ClientCertificateMapOutput {
   228  	return pulumi.ToOutputWithContext(ctx, i).(ClientCertificateMapOutput)
   229  }
   230  
   231  type ClientCertificateOutput struct{ *pulumi.OutputState }
   232  
   233  func (ClientCertificateOutput) ElementType() reflect.Type {
   234  	return reflect.TypeOf((**ClientCertificate)(nil)).Elem()
   235  }
   236  
   237  func (o ClientCertificateOutput) ToClientCertificateOutput() ClientCertificateOutput {
   238  	return o
   239  }
   240  
   241  func (o ClientCertificateOutput) ToClientCertificateOutputWithContext(ctx context.Context) ClientCertificateOutput {
   242  	return o
   243  }
   244  
   245  // ARN
   246  func (o ClientCertificateOutput) Arn() pulumi.StringOutput {
   247  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   248  }
   249  
   250  // Date when the client certificate was created.
   251  func (o ClientCertificateOutput) CreatedDate() pulumi.StringOutput {
   252  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringOutput { return v.CreatedDate }).(pulumi.StringOutput)
   253  }
   254  
   255  // Description of the client certificate.
   256  func (o ClientCertificateOutput) Description() pulumi.StringPtrOutput {
   257  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   258  }
   259  
   260  // Date when the client certificate will expire.
   261  func (o ClientCertificateOutput) ExpirationDate() pulumi.StringOutput {
   262  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringOutput { return v.ExpirationDate }).(pulumi.StringOutput)
   263  }
   264  
   265  // The PEM-encoded public key of the client certificate.
   266  func (o ClientCertificateOutput) PemEncodedCertificate() pulumi.StringOutput {
   267  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringOutput { return v.PemEncodedCertificate }).(pulumi.StringOutput)
   268  }
   269  
   270  // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   271  func (o ClientCertificateOutput) Tags() pulumi.StringMapOutput {
   272  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   273  }
   274  
   275  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   276  //
   277  // Deprecated: Please use `tags` instead.
   278  func (o ClientCertificateOutput) TagsAll() pulumi.StringMapOutput {
   279  	return o.ApplyT(func(v *ClientCertificate) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   280  }
   281  
   282  type ClientCertificateArrayOutput struct{ *pulumi.OutputState }
   283  
   284  func (ClientCertificateArrayOutput) ElementType() reflect.Type {
   285  	return reflect.TypeOf((*[]*ClientCertificate)(nil)).Elem()
   286  }
   287  
   288  func (o ClientCertificateArrayOutput) ToClientCertificateArrayOutput() ClientCertificateArrayOutput {
   289  	return o
   290  }
   291  
   292  func (o ClientCertificateArrayOutput) ToClientCertificateArrayOutputWithContext(ctx context.Context) ClientCertificateArrayOutput {
   293  	return o
   294  }
   295  
   296  func (o ClientCertificateArrayOutput) Index(i pulumi.IntInput) ClientCertificateOutput {
   297  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClientCertificate {
   298  		return vs[0].([]*ClientCertificate)[vs[1].(int)]
   299  	}).(ClientCertificateOutput)
   300  }
   301  
   302  type ClientCertificateMapOutput struct{ *pulumi.OutputState }
   303  
   304  func (ClientCertificateMapOutput) ElementType() reflect.Type {
   305  	return reflect.TypeOf((*map[string]*ClientCertificate)(nil)).Elem()
   306  }
   307  
   308  func (o ClientCertificateMapOutput) ToClientCertificateMapOutput() ClientCertificateMapOutput {
   309  	return o
   310  }
   311  
   312  func (o ClientCertificateMapOutput) ToClientCertificateMapOutputWithContext(ctx context.Context) ClientCertificateMapOutput {
   313  	return o
   314  }
   315  
   316  func (o ClientCertificateMapOutput) MapIndex(k pulumi.StringInput) ClientCertificateOutput {
   317  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClientCertificate {
   318  		return vs[0].(map[string]*ClientCertificate)[vs[1].(string)]
   319  	}).(ClientCertificateOutput)
   320  }
   321  
   322  func init() {
   323  	pulumi.RegisterInputType(reflect.TypeOf((*ClientCertificateInput)(nil)).Elem(), &ClientCertificate{})
   324  	pulumi.RegisterInputType(reflect.TypeOf((*ClientCertificateArrayInput)(nil)).Elem(), ClientCertificateArray{})
   325  	pulumi.RegisterInputType(reflect.TypeOf((*ClientCertificateMapInput)(nil)).Elem(), ClientCertificateMap{})
   326  	pulumi.RegisterOutputType(ClientCertificateOutput{})
   327  	pulumi.RegisterOutputType(ClientCertificateArrayOutput{})
   328  	pulumi.RegisterOutputType(ClientCertificateMapOutput{})
   329  }