github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/transfer/profile.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 transfer
     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 a AWS Transfer AS2 Profile resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // ## Import
    20  //
    21  // Using `pulumi import`, import Transfer AS2 Profile using the `profile_id`. For example:
    22  //
    23  // ```sh
    24  // $ pulumi import aws:transfer/profile:Profile example p-4221a88afd5f4362a
    25  // ```
    26  type Profile struct {
    27  	pulumi.CustomResourceState
    28  
    29  	// The ARN of the profile.
    30  	Arn pulumi.StringOutput `pulumi:"arn"`
    31  	// The As2Id is the AS2 name as defined in the RFC 4130. For inbound ttransfers this is the AS2 From Header for the AS2 messages sent from the partner. For Outbound messages this is the AS2 To Header for the AS2 messages sent to the partner. his ID cannot include spaces.
    32  	As2Id pulumi.StringOutput `pulumi:"as2Id"`
    33  	// The list of certificate Ids from the imported certificate operation.
    34  	CertificateIds pulumi.StringArrayOutput `pulumi:"certificateIds"`
    35  	// The unique identifier for the AS2 profile.
    36  	ProfileId pulumi.StringOutput `pulumi:"profileId"`
    37  	// The profile type should be LOCAL or PARTNER.
    38  	ProfileType pulumi.StringOutput `pulumi:"profileType"`
    39  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    40  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    41  	// Deprecated: Please use `tags` instead.
    42  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    43  }
    44  
    45  // NewProfile registers a new resource with the given unique name, arguments, and options.
    46  func NewProfile(ctx *pulumi.Context,
    47  	name string, args *ProfileArgs, opts ...pulumi.ResourceOption) (*Profile, error) {
    48  	if args == nil {
    49  		return nil, errors.New("missing one or more required arguments")
    50  	}
    51  
    52  	if args.As2Id == nil {
    53  		return nil, errors.New("invalid value for required argument 'As2Id'")
    54  	}
    55  	if args.ProfileType == nil {
    56  		return nil, errors.New("invalid value for required argument 'ProfileType'")
    57  	}
    58  	opts = internal.PkgResourceDefaultOpts(opts)
    59  	var resource Profile
    60  	err := ctx.RegisterResource("aws:transfer/profile:Profile", name, args, &resource, opts...)
    61  	if err != nil {
    62  		return nil, err
    63  	}
    64  	return &resource, nil
    65  }
    66  
    67  // GetProfile gets an existing Profile resource's state with the given name, ID, and optional
    68  // state properties that are used to uniquely qualify the lookup (nil if not required).
    69  func GetProfile(ctx *pulumi.Context,
    70  	name string, id pulumi.IDInput, state *ProfileState, opts ...pulumi.ResourceOption) (*Profile, error) {
    71  	var resource Profile
    72  	err := ctx.ReadResource("aws:transfer/profile:Profile", name, id, state, &resource, opts...)
    73  	if err != nil {
    74  		return nil, err
    75  	}
    76  	return &resource, nil
    77  }
    78  
    79  // Input properties used for looking up and filtering Profile resources.
    80  type profileState struct {
    81  	// The ARN of the profile.
    82  	Arn *string `pulumi:"arn"`
    83  	// The As2Id is the AS2 name as defined in the RFC 4130. For inbound ttransfers this is the AS2 From Header for the AS2 messages sent from the partner. For Outbound messages this is the AS2 To Header for the AS2 messages sent to the partner. his ID cannot include spaces.
    84  	As2Id *string `pulumi:"as2Id"`
    85  	// The list of certificate Ids from the imported certificate operation.
    86  	CertificateIds []string `pulumi:"certificateIds"`
    87  	// The unique identifier for the AS2 profile.
    88  	ProfileId *string `pulumi:"profileId"`
    89  	// The profile type should be LOCAL or PARTNER.
    90  	ProfileType *string `pulumi:"profileType"`
    91  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    92  	Tags map[string]string `pulumi:"tags"`
    93  	// Deprecated: Please use `tags` instead.
    94  	TagsAll map[string]string `pulumi:"tagsAll"`
    95  }
    96  
    97  type ProfileState struct {
    98  	// The ARN of the profile.
    99  	Arn pulumi.StringPtrInput
   100  	// The As2Id is the AS2 name as defined in the RFC 4130. For inbound ttransfers this is the AS2 From Header for the AS2 messages sent from the partner. For Outbound messages this is the AS2 To Header for the AS2 messages sent to the partner. his ID cannot include spaces.
   101  	As2Id pulumi.StringPtrInput
   102  	// The list of certificate Ids from the imported certificate operation.
   103  	CertificateIds pulumi.StringArrayInput
   104  	// The unique identifier for the AS2 profile.
   105  	ProfileId pulumi.StringPtrInput
   106  	// The profile type should be LOCAL or PARTNER.
   107  	ProfileType pulumi.StringPtrInput
   108  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   109  	Tags pulumi.StringMapInput
   110  	// Deprecated: Please use `tags` instead.
   111  	TagsAll pulumi.StringMapInput
   112  }
   113  
   114  func (ProfileState) ElementType() reflect.Type {
   115  	return reflect.TypeOf((*profileState)(nil)).Elem()
   116  }
   117  
   118  type profileArgs struct {
   119  	// The As2Id is the AS2 name as defined in the RFC 4130. For inbound ttransfers this is the AS2 From Header for the AS2 messages sent from the partner. For Outbound messages this is the AS2 To Header for the AS2 messages sent to the partner. his ID cannot include spaces.
   120  	As2Id string `pulumi:"as2Id"`
   121  	// The list of certificate Ids from the imported certificate operation.
   122  	CertificateIds []string `pulumi:"certificateIds"`
   123  	// The profile type should be LOCAL or PARTNER.
   124  	ProfileType string `pulumi:"profileType"`
   125  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   126  	Tags map[string]string `pulumi:"tags"`
   127  }
   128  
   129  // The set of arguments for constructing a Profile resource.
   130  type ProfileArgs struct {
   131  	// The As2Id is the AS2 name as defined in the RFC 4130. For inbound ttransfers this is the AS2 From Header for the AS2 messages sent from the partner. For Outbound messages this is the AS2 To Header for the AS2 messages sent to the partner. his ID cannot include spaces.
   132  	As2Id pulumi.StringInput
   133  	// The list of certificate Ids from the imported certificate operation.
   134  	CertificateIds pulumi.StringArrayInput
   135  	// The profile type should be LOCAL or PARTNER.
   136  	ProfileType pulumi.StringInput
   137  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   138  	Tags pulumi.StringMapInput
   139  }
   140  
   141  func (ProfileArgs) ElementType() reflect.Type {
   142  	return reflect.TypeOf((*profileArgs)(nil)).Elem()
   143  }
   144  
   145  type ProfileInput interface {
   146  	pulumi.Input
   147  
   148  	ToProfileOutput() ProfileOutput
   149  	ToProfileOutputWithContext(ctx context.Context) ProfileOutput
   150  }
   151  
   152  func (*Profile) ElementType() reflect.Type {
   153  	return reflect.TypeOf((**Profile)(nil)).Elem()
   154  }
   155  
   156  func (i *Profile) ToProfileOutput() ProfileOutput {
   157  	return i.ToProfileOutputWithContext(context.Background())
   158  }
   159  
   160  func (i *Profile) ToProfileOutputWithContext(ctx context.Context) ProfileOutput {
   161  	return pulumi.ToOutputWithContext(ctx, i).(ProfileOutput)
   162  }
   163  
   164  // ProfileArrayInput is an input type that accepts ProfileArray and ProfileArrayOutput values.
   165  // You can construct a concrete instance of `ProfileArrayInput` via:
   166  //
   167  //	ProfileArray{ ProfileArgs{...} }
   168  type ProfileArrayInput interface {
   169  	pulumi.Input
   170  
   171  	ToProfileArrayOutput() ProfileArrayOutput
   172  	ToProfileArrayOutputWithContext(context.Context) ProfileArrayOutput
   173  }
   174  
   175  type ProfileArray []ProfileInput
   176  
   177  func (ProfileArray) ElementType() reflect.Type {
   178  	return reflect.TypeOf((*[]*Profile)(nil)).Elem()
   179  }
   180  
   181  func (i ProfileArray) ToProfileArrayOutput() ProfileArrayOutput {
   182  	return i.ToProfileArrayOutputWithContext(context.Background())
   183  }
   184  
   185  func (i ProfileArray) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput {
   186  	return pulumi.ToOutputWithContext(ctx, i).(ProfileArrayOutput)
   187  }
   188  
   189  // ProfileMapInput is an input type that accepts ProfileMap and ProfileMapOutput values.
   190  // You can construct a concrete instance of `ProfileMapInput` via:
   191  //
   192  //	ProfileMap{ "key": ProfileArgs{...} }
   193  type ProfileMapInput interface {
   194  	pulumi.Input
   195  
   196  	ToProfileMapOutput() ProfileMapOutput
   197  	ToProfileMapOutputWithContext(context.Context) ProfileMapOutput
   198  }
   199  
   200  type ProfileMap map[string]ProfileInput
   201  
   202  func (ProfileMap) ElementType() reflect.Type {
   203  	return reflect.TypeOf((*map[string]*Profile)(nil)).Elem()
   204  }
   205  
   206  func (i ProfileMap) ToProfileMapOutput() ProfileMapOutput {
   207  	return i.ToProfileMapOutputWithContext(context.Background())
   208  }
   209  
   210  func (i ProfileMap) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput {
   211  	return pulumi.ToOutputWithContext(ctx, i).(ProfileMapOutput)
   212  }
   213  
   214  type ProfileOutput struct{ *pulumi.OutputState }
   215  
   216  func (ProfileOutput) ElementType() reflect.Type {
   217  	return reflect.TypeOf((**Profile)(nil)).Elem()
   218  }
   219  
   220  func (o ProfileOutput) ToProfileOutput() ProfileOutput {
   221  	return o
   222  }
   223  
   224  func (o ProfileOutput) ToProfileOutputWithContext(ctx context.Context) ProfileOutput {
   225  	return o
   226  }
   227  
   228  // The ARN of the profile.
   229  func (o ProfileOutput) Arn() pulumi.StringOutput {
   230  	return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   231  }
   232  
   233  // The As2Id is the AS2 name as defined in the RFC 4130. For inbound ttransfers this is the AS2 From Header for the AS2 messages sent from the partner. For Outbound messages this is the AS2 To Header for the AS2 messages sent to the partner. his ID cannot include spaces.
   234  func (o ProfileOutput) As2Id() pulumi.StringOutput {
   235  	return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.As2Id }).(pulumi.StringOutput)
   236  }
   237  
   238  // The list of certificate Ids from the imported certificate operation.
   239  func (o ProfileOutput) CertificateIds() pulumi.StringArrayOutput {
   240  	return o.ApplyT(func(v *Profile) pulumi.StringArrayOutput { return v.CertificateIds }).(pulumi.StringArrayOutput)
   241  }
   242  
   243  // The unique identifier for the AS2 profile.
   244  func (o ProfileOutput) ProfileId() pulumi.StringOutput {
   245  	return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.ProfileId }).(pulumi.StringOutput)
   246  }
   247  
   248  // The profile type should be LOCAL or PARTNER.
   249  func (o ProfileOutput) ProfileType() pulumi.StringOutput {
   250  	return o.ApplyT(func(v *Profile) pulumi.StringOutput { return v.ProfileType }).(pulumi.StringOutput)
   251  }
   252  
   253  // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   254  func (o ProfileOutput) Tags() pulumi.StringMapOutput {
   255  	return o.ApplyT(func(v *Profile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   256  }
   257  
   258  // Deprecated: Please use `tags` instead.
   259  func (o ProfileOutput) TagsAll() pulumi.StringMapOutput {
   260  	return o.ApplyT(func(v *Profile) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   261  }
   262  
   263  type ProfileArrayOutput struct{ *pulumi.OutputState }
   264  
   265  func (ProfileArrayOutput) ElementType() reflect.Type {
   266  	return reflect.TypeOf((*[]*Profile)(nil)).Elem()
   267  }
   268  
   269  func (o ProfileArrayOutput) ToProfileArrayOutput() ProfileArrayOutput {
   270  	return o
   271  }
   272  
   273  func (o ProfileArrayOutput) ToProfileArrayOutputWithContext(ctx context.Context) ProfileArrayOutput {
   274  	return o
   275  }
   276  
   277  func (o ProfileArrayOutput) Index(i pulumi.IntInput) ProfileOutput {
   278  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Profile {
   279  		return vs[0].([]*Profile)[vs[1].(int)]
   280  	}).(ProfileOutput)
   281  }
   282  
   283  type ProfileMapOutput struct{ *pulumi.OutputState }
   284  
   285  func (ProfileMapOutput) ElementType() reflect.Type {
   286  	return reflect.TypeOf((*map[string]*Profile)(nil)).Elem()
   287  }
   288  
   289  func (o ProfileMapOutput) ToProfileMapOutput() ProfileMapOutput {
   290  	return o
   291  }
   292  
   293  func (o ProfileMapOutput) ToProfileMapOutputWithContext(ctx context.Context) ProfileMapOutput {
   294  	return o
   295  }
   296  
   297  func (o ProfileMapOutput) MapIndex(k pulumi.StringInput) ProfileOutput {
   298  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Profile {
   299  		return vs[0].(map[string]*Profile)[vs[1].(string)]
   300  	}).(ProfileOutput)
   301  }
   302  
   303  func init() {
   304  	pulumi.RegisterInputType(reflect.TypeOf((*ProfileInput)(nil)).Elem(), &Profile{})
   305  	pulumi.RegisterInputType(reflect.TypeOf((*ProfileArrayInput)(nil)).Elem(), ProfileArray{})
   306  	pulumi.RegisterInputType(reflect.TypeOf((*ProfileMapInput)(nil)).Elem(), ProfileMap{})
   307  	pulumi.RegisterOutputType(ProfileOutput{})
   308  	pulumi.RegisterOutputType(ProfileArrayOutput{})
   309  	pulumi.RegisterOutputType(ProfileMapOutput{})
   310  }