github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/securityProfile.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 connect
     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 an Amazon Connect Security Profile resource. For more information see
    16  // [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
    17  //
    18  // ## Example Usage
    19  //
    20  // <!--Start PulumiCodeChooser -->
    21  // ```go
    22  // package main
    23  //
    24  // import (
    25  //
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
    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 := connect.NewSecurityProfile(ctx, "example", &connect.SecurityProfileArgs{
    34  //				InstanceId:  pulumi.String("aaaaaaaa-bbbb-cccc-dddd-111111111111"),
    35  //				Name:        pulumi.String("example"),
    36  //				Description: pulumi.String("example description"),
    37  //				Permissions: pulumi.StringArray{
    38  //					pulumi.String("BasicAgentAccess"),
    39  //					pulumi.String("OutboundCallAccess"),
    40  //				},
    41  //				Tags: pulumi.StringMap{
    42  //					"Name": pulumi.String("Example Security Profile"),
    43  //				},
    44  //			})
    45  //			if err != nil {
    46  //				return err
    47  //			}
    48  //			return nil
    49  //		})
    50  //	}
    51  //
    52  // ```
    53  // <!--End PulumiCodeChooser -->
    54  //
    55  // ## Import
    56  //
    57  // Using `pulumi import`, import Amazon Connect Security Profiles using the `instance_id` and `security_profile_id` separated by a colon (`:`). For example:
    58  //
    59  // ```sh
    60  // $ pulumi import aws:connect/securityProfile:SecurityProfile example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
    61  // ```
    62  type SecurityProfile struct {
    63  	pulumi.CustomResourceState
    64  
    65  	// The Amazon Resource Name (ARN) of the Security Profile.
    66  	Arn pulumi.StringOutput `pulumi:"arn"`
    67  	// Specifies the description of the Security Profile.
    68  	Description pulumi.StringPtrOutput `pulumi:"description"`
    69  	// Specifies the identifier of the hosting Amazon Connect Instance.
    70  	InstanceId pulumi.StringOutput `pulumi:"instanceId"`
    71  	// Specifies the name of the Security Profile.
    72  	Name pulumi.StringOutput `pulumi:"name"`
    73  	// The organization resource identifier for the security profile.
    74  	OrganizationResourceId pulumi.StringOutput `pulumi:"organizationResourceId"`
    75  	// Specifies a list of permissions assigned to the security profile.
    76  	Permissions pulumi.StringArrayOutput `pulumi:"permissions"`
    77  	// The identifier for the Security Profile.
    78  	SecurityProfileId pulumi.StringOutput `pulumi:"securityProfileId"`
    79  	// Tags to apply to the Security Profile. If configured with a provider
    80  	// `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    81  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    82  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    83  	//
    84  	// Deprecated: Please use `tags` instead.
    85  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    86  }
    87  
    88  // NewSecurityProfile registers a new resource with the given unique name, arguments, and options.
    89  func NewSecurityProfile(ctx *pulumi.Context,
    90  	name string, args *SecurityProfileArgs, opts ...pulumi.ResourceOption) (*SecurityProfile, error) {
    91  	if args == nil {
    92  		return nil, errors.New("missing one or more required arguments")
    93  	}
    94  
    95  	if args.InstanceId == nil {
    96  		return nil, errors.New("invalid value for required argument 'InstanceId'")
    97  	}
    98  	opts = internal.PkgResourceDefaultOpts(opts)
    99  	var resource SecurityProfile
   100  	err := ctx.RegisterResource("aws:connect/securityProfile:SecurityProfile", name, args, &resource, opts...)
   101  	if err != nil {
   102  		return nil, err
   103  	}
   104  	return &resource, nil
   105  }
   106  
   107  // GetSecurityProfile gets an existing SecurityProfile resource's state with the given name, ID, and optional
   108  // state properties that are used to uniquely qualify the lookup (nil if not required).
   109  func GetSecurityProfile(ctx *pulumi.Context,
   110  	name string, id pulumi.IDInput, state *SecurityProfileState, opts ...pulumi.ResourceOption) (*SecurityProfile, error) {
   111  	var resource SecurityProfile
   112  	err := ctx.ReadResource("aws:connect/securityProfile:SecurityProfile", name, id, state, &resource, opts...)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return &resource, nil
   117  }
   118  
   119  // Input properties used for looking up and filtering SecurityProfile resources.
   120  type securityProfileState struct {
   121  	// The Amazon Resource Name (ARN) of the Security Profile.
   122  	Arn *string `pulumi:"arn"`
   123  	// Specifies the description of the Security Profile.
   124  	Description *string `pulumi:"description"`
   125  	// Specifies the identifier of the hosting Amazon Connect Instance.
   126  	InstanceId *string `pulumi:"instanceId"`
   127  	// Specifies the name of the Security Profile.
   128  	Name *string `pulumi:"name"`
   129  	// The organization resource identifier for the security profile.
   130  	OrganizationResourceId *string `pulumi:"organizationResourceId"`
   131  	// Specifies a list of permissions assigned to the security profile.
   132  	Permissions []string `pulumi:"permissions"`
   133  	// The identifier for the Security Profile.
   134  	SecurityProfileId *string `pulumi:"securityProfileId"`
   135  	// Tags to apply to the Security Profile. If configured with a provider
   136  	// `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   137  	Tags map[string]string `pulumi:"tags"`
   138  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   139  	//
   140  	// Deprecated: Please use `tags` instead.
   141  	TagsAll map[string]string `pulumi:"tagsAll"`
   142  }
   143  
   144  type SecurityProfileState struct {
   145  	// The Amazon Resource Name (ARN) of the Security Profile.
   146  	Arn pulumi.StringPtrInput
   147  	// Specifies the description of the Security Profile.
   148  	Description pulumi.StringPtrInput
   149  	// Specifies the identifier of the hosting Amazon Connect Instance.
   150  	InstanceId pulumi.StringPtrInput
   151  	// Specifies the name of the Security Profile.
   152  	Name pulumi.StringPtrInput
   153  	// The organization resource identifier for the security profile.
   154  	OrganizationResourceId pulumi.StringPtrInput
   155  	// Specifies a list of permissions assigned to the security profile.
   156  	Permissions pulumi.StringArrayInput
   157  	// The identifier for the Security Profile.
   158  	SecurityProfileId pulumi.StringPtrInput
   159  	// Tags to apply to the Security Profile. If configured with a provider
   160  	// `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   161  	Tags pulumi.StringMapInput
   162  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   163  	//
   164  	// Deprecated: Please use `tags` instead.
   165  	TagsAll pulumi.StringMapInput
   166  }
   167  
   168  func (SecurityProfileState) ElementType() reflect.Type {
   169  	return reflect.TypeOf((*securityProfileState)(nil)).Elem()
   170  }
   171  
   172  type securityProfileArgs struct {
   173  	// Specifies the description of the Security Profile.
   174  	Description *string `pulumi:"description"`
   175  	// Specifies the identifier of the hosting Amazon Connect Instance.
   176  	InstanceId string `pulumi:"instanceId"`
   177  	// Specifies the name of the Security Profile.
   178  	Name *string `pulumi:"name"`
   179  	// Specifies a list of permissions assigned to the security profile.
   180  	Permissions []string `pulumi:"permissions"`
   181  	// Tags to apply to the Security Profile. If configured with a provider
   182  	// `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   183  	Tags map[string]string `pulumi:"tags"`
   184  }
   185  
   186  // The set of arguments for constructing a SecurityProfile resource.
   187  type SecurityProfileArgs struct {
   188  	// Specifies the description of the Security Profile.
   189  	Description pulumi.StringPtrInput
   190  	// Specifies the identifier of the hosting Amazon Connect Instance.
   191  	InstanceId pulumi.StringInput
   192  	// Specifies the name of the Security Profile.
   193  	Name pulumi.StringPtrInput
   194  	// Specifies a list of permissions assigned to the security profile.
   195  	Permissions pulumi.StringArrayInput
   196  	// Tags to apply to the Security Profile. If configured with a provider
   197  	// `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   198  	Tags pulumi.StringMapInput
   199  }
   200  
   201  func (SecurityProfileArgs) ElementType() reflect.Type {
   202  	return reflect.TypeOf((*securityProfileArgs)(nil)).Elem()
   203  }
   204  
   205  type SecurityProfileInput interface {
   206  	pulumi.Input
   207  
   208  	ToSecurityProfileOutput() SecurityProfileOutput
   209  	ToSecurityProfileOutputWithContext(ctx context.Context) SecurityProfileOutput
   210  }
   211  
   212  func (*SecurityProfile) ElementType() reflect.Type {
   213  	return reflect.TypeOf((**SecurityProfile)(nil)).Elem()
   214  }
   215  
   216  func (i *SecurityProfile) ToSecurityProfileOutput() SecurityProfileOutput {
   217  	return i.ToSecurityProfileOutputWithContext(context.Background())
   218  }
   219  
   220  func (i *SecurityProfile) ToSecurityProfileOutputWithContext(ctx context.Context) SecurityProfileOutput {
   221  	return pulumi.ToOutputWithContext(ctx, i).(SecurityProfileOutput)
   222  }
   223  
   224  // SecurityProfileArrayInput is an input type that accepts SecurityProfileArray and SecurityProfileArrayOutput values.
   225  // You can construct a concrete instance of `SecurityProfileArrayInput` via:
   226  //
   227  //	SecurityProfileArray{ SecurityProfileArgs{...} }
   228  type SecurityProfileArrayInput interface {
   229  	pulumi.Input
   230  
   231  	ToSecurityProfileArrayOutput() SecurityProfileArrayOutput
   232  	ToSecurityProfileArrayOutputWithContext(context.Context) SecurityProfileArrayOutput
   233  }
   234  
   235  type SecurityProfileArray []SecurityProfileInput
   236  
   237  func (SecurityProfileArray) ElementType() reflect.Type {
   238  	return reflect.TypeOf((*[]*SecurityProfile)(nil)).Elem()
   239  }
   240  
   241  func (i SecurityProfileArray) ToSecurityProfileArrayOutput() SecurityProfileArrayOutput {
   242  	return i.ToSecurityProfileArrayOutputWithContext(context.Background())
   243  }
   244  
   245  func (i SecurityProfileArray) ToSecurityProfileArrayOutputWithContext(ctx context.Context) SecurityProfileArrayOutput {
   246  	return pulumi.ToOutputWithContext(ctx, i).(SecurityProfileArrayOutput)
   247  }
   248  
   249  // SecurityProfileMapInput is an input type that accepts SecurityProfileMap and SecurityProfileMapOutput values.
   250  // You can construct a concrete instance of `SecurityProfileMapInput` via:
   251  //
   252  //	SecurityProfileMap{ "key": SecurityProfileArgs{...} }
   253  type SecurityProfileMapInput interface {
   254  	pulumi.Input
   255  
   256  	ToSecurityProfileMapOutput() SecurityProfileMapOutput
   257  	ToSecurityProfileMapOutputWithContext(context.Context) SecurityProfileMapOutput
   258  }
   259  
   260  type SecurityProfileMap map[string]SecurityProfileInput
   261  
   262  func (SecurityProfileMap) ElementType() reflect.Type {
   263  	return reflect.TypeOf((*map[string]*SecurityProfile)(nil)).Elem()
   264  }
   265  
   266  func (i SecurityProfileMap) ToSecurityProfileMapOutput() SecurityProfileMapOutput {
   267  	return i.ToSecurityProfileMapOutputWithContext(context.Background())
   268  }
   269  
   270  func (i SecurityProfileMap) ToSecurityProfileMapOutputWithContext(ctx context.Context) SecurityProfileMapOutput {
   271  	return pulumi.ToOutputWithContext(ctx, i).(SecurityProfileMapOutput)
   272  }
   273  
   274  type SecurityProfileOutput struct{ *pulumi.OutputState }
   275  
   276  func (SecurityProfileOutput) ElementType() reflect.Type {
   277  	return reflect.TypeOf((**SecurityProfile)(nil)).Elem()
   278  }
   279  
   280  func (o SecurityProfileOutput) ToSecurityProfileOutput() SecurityProfileOutput {
   281  	return o
   282  }
   283  
   284  func (o SecurityProfileOutput) ToSecurityProfileOutputWithContext(ctx context.Context) SecurityProfileOutput {
   285  	return o
   286  }
   287  
   288  // The Amazon Resource Name (ARN) of the Security Profile.
   289  func (o SecurityProfileOutput) Arn() pulumi.StringOutput {
   290  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   291  }
   292  
   293  // Specifies the description of the Security Profile.
   294  func (o SecurityProfileOutput) Description() pulumi.StringPtrOutput {
   295  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   296  }
   297  
   298  // Specifies the identifier of the hosting Amazon Connect Instance.
   299  func (o SecurityProfileOutput) InstanceId() pulumi.StringOutput {
   300  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringOutput { return v.InstanceId }).(pulumi.StringOutput)
   301  }
   302  
   303  // Specifies the name of the Security Profile.
   304  func (o SecurityProfileOutput) Name() pulumi.StringOutput {
   305  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   306  }
   307  
   308  // The organization resource identifier for the security profile.
   309  func (o SecurityProfileOutput) OrganizationResourceId() pulumi.StringOutput {
   310  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringOutput { return v.OrganizationResourceId }).(pulumi.StringOutput)
   311  }
   312  
   313  // Specifies a list of permissions assigned to the security profile.
   314  func (o SecurityProfileOutput) Permissions() pulumi.StringArrayOutput {
   315  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringArrayOutput { return v.Permissions }).(pulumi.StringArrayOutput)
   316  }
   317  
   318  // The identifier for the Security Profile.
   319  func (o SecurityProfileOutput) SecurityProfileId() pulumi.StringOutput {
   320  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringOutput { return v.SecurityProfileId }).(pulumi.StringOutput)
   321  }
   322  
   323  // Tags to apply to the Security Profile. If configured with a provider
   324  // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   325  func (o SecurityProfileOutput) Tags() pulumi.StringMapOutput {
   326  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   327  }
   328  
   329  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   330  //
   331  // Deprecated: Please use `tags` instead.
   332  func (o SecurityProfileOutput) TagsAll() pulumi.StringMapOutput {
   333  	return o.ApplyT(func(v *SecurityProfile) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   334  }
   335  
   336  type SecurityProfileArrayOutput struct{ *pulumi.OutputState }
   337  
   338  func (SecurityProfileArrayOutput) ElementType() reflect.Type {
   339  	return reflect.TypeOf((*[]*SecurityProfile)(nil)).Elem()
   340  }
   341  
   342  func (o SecurityProfileArrayOutput) ToSecurityProfileArrayOutput() SecurityProfileArrayOutput {
   343  	return o
   344  }
   345  
   346  func (o SecurityProfileArrayOutput) ToSecurityProfileArrayOutputWithContext(ctx context.Context) SecurityProfileArrayOutput {
   347  	return o
   348  }
   349  
   350  func (o SecurityProfileArrayOutput) Index(i pulumi.IntInput) SecurityProfileOutput {
   351  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SecurityProfile {
   352  		return vs[0].([]*SecurityProfile)[vs[1].(int)]
   353  	}).(SecurityProfileOutput)
   354  }
   355  
   356  type SecurityProfileMapOutput struct{ *pulumi.OutputState }
   357  
   358  func (SecurityProfileMapOutput) ElementType() reflect.Type {
   359  	return reflect.TypeOf((*map[string]*SecurityProfile)(nil)).Elem()
   360  }
   361  
   362  func (o SecurityProfileMapOutput) ToSecurityProfileMapOutput() SecurityProfileMapOutput {
   363  	return o
   364  }
   365  
   366  func (o SecurityProfileMapOutput) ToSecurityProfileMapOutputWithContext(ctx context.Context) SecurityProfileMapOutput {
   367  	return o
   368  }
   369  
   370  func (o SecurityProfileMapOutput) MapIndex(k pulumi.StringInput) SecurityProfileOutput {
   371  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SecurityProfile {
   372  		return vs[0].(map[string]*SecurityProfile)[vs[1].(string)]
   373  	}).(SecurityProfileOutput)
   374  }
   375  
   376  func init() {
   377  	pulumi.RegisterInputType(reflect.TypeOf((*SecurityProfileInput)(nil)).Elem(), &SecurityProfile{})
   378  	pulumi.RegisterInputType(reflect.TypeOf((*SecurityProfileArrayInput)(nil)).Elem(), SecurityProfileArray{})
   379  	pulumi.RegisterInputType(reflect.TypeOf((*SecurityProfileMapInput)(nil)).Elem(), SecurityProfileMap{})
   380  	pulumi.RegisterOutputType(SecurityProfileOutput{})
   381  	pulumi.RegisterOutputType(SecurityProfileArrayOutput{})
   382  	pulumi.RegisterOutputType(SecurityProfileMapOutput{})
   383  }