github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/connect/routingProfile.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 Routing 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.NewRoutingProfile(ctx, "example", &connect.RoutingProfileArgs{ 34 // InstanceId: pulumi.String("aaaaaaaa-bbbb-cccc-dddd-111111111111"), 35 // Name: pulumi.String("example"), 36 // DefaultOutboundQueueId: pulumi.String("12345678-1234-1234-1234-123456789012"), 37 // Description: pulumi.String("example description"), 38 // MediaConcurrencies: connect.RoutingProfileMediaConcurrencyArray{ 39 // &connect.RoutingProfileMediaConcurrencyArgs{ 40 // Channel: pulumi.String("VOICE"), 41 // Concurrency: pulumi.Int(1), 42 // }, 43 // }, 44 // QueueConfigs: connect.RoutingProfileQueueConfigArray{ 45 // &connect.RoutingProfileQueueConfigArgs{ 46 // Channel: pulumi.String("VOICE"), 47 // Delay: pulumi.Int(2), 48 // Priority: pulumi.Int(1), 49 // QueueId: pulumi.String("12345678-1234-1234-1234-123456789012"), 50 // }, 51 // }, 52 // Tags: pulumi.StringMap{ 53 // "Name": pulumi.String("Example Routing Profile"), 54 // }, 55 // }) 56 // if err != nil { 57 // return err 58 // } 59 // return nil 60 // }) 61 // } 62 // 63 // ``` 64 // <!--End PulumiCodeChooser --> 65 // 66 // ## Import 67 // 68 // Using `pulumi import`, import Amazon Connect Routing Profiles using the `instance_id` and `routing_profile_id` separated by a colon (`:`). For example: 69 // 70 // ```sh 71 // $ pulumi import aws:connect/routingProfile:RoutingProfile example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 72 // ``` 73 type RoutingProfile struct { 74 pulumi.CustomResourceState 75 76 // The Amazon Resource Name (ARN) of the Routing Profile. 77 Arn pulumi.StringOutput `pulumi:"arn"` 78 // Specifies the default outbound queue for the Routing Profile. 79 DefaultOutboundQueueId pulumi.StringOutput `pulumi:"defaultOutboundQueueId"` 80 // Specifies the description of the Routing Profile. 81 Description pulumi.StringOutput `pulumi:"description"` 82 // Specifies the identifier of the hosting Amazon Connect Instance. 83 InstanceId pulumi.StringOutput `pulumi:"instanceId"` 84 // One or more `mediaConcurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `mediaConcurrencies` block is documented below. 85 MediaConcurrencies RoutingProfileMediaConcurrencyArrayOutput `pulumi:"mediaConcurrencies"` 86 // Specifies the name of the Routing Profile. 87 Name pulumi.StringOutput `pulumi:"name"` 88 // One or more `queueConfigs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queueConfigs` block is documented below. 89 QueueConfigs RoutingProfileQueueConfigArrayOutput `pulumi:"queueConfigs"` 90 // The identifier for the Routing Profile. 91 RoutingProfileId pulumi.StringOutput `pulumi:"routingProfileId"` 92 // Tags to apply to the Routing Profile. If configured with a provider 93 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 94 Tags pulumi.StringMapOutput `pulumi:"tags"` 95 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 96 // 97 // Deprecated: Please use `tags` instead. 98 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 99 } 100 101 // NewRoutingProfile registers a new resource with the given unique name, arguments, and options. 102 func NewRoutingProfile(ctx *pulumi.Context, 103 name string, args *RoutingProfileArgs, opts ...pulumi.ResourceOption) (*RoutingProfile, error) { 104 if args == nil { 105 return nil, errors.New("missing one or more required arguments") 106 } 107 108 if args.DefaultOutboundQueueId == nil { 109 return nil, errors.New("invalid value for required argument 'DefaultOutboundQueueId'") 110 } 111 if args.Description == nil { 112 return nil, errors.New("invalid value for required argument 'Description'") 113 } 114 if args.InstanceId == nil { 115 return nil, errors.New("invalid value for required argument 'InstanceId'") 116 } 117 if args.MediaConcurrencies == nil { 118 return nil, errors.New("invalid value for required argument 'MediaConcurrencies'") 119 } 120 opts = internal.PkgResourceDefaultOpts(opts) 121 var resource RoutingProfile 122 err := ctx.RegisterResource("aws:connect/routingProfile:RoutingProfile", name, args, &resource, opts...) 123 if err != nil { 124 return nil, err 125 } 126 return &resource, nil 127 } 128 129 // GetRoutingProfile gets an existing RoutingProfile resource's state with the given name, ID, and optional 130 // state properties that are used to uniquely qualify the lookup (nil if not required). 131 func GetRoutingProfile(ctx *pulumi.Context, 132 name string, id pulumi.IDInput, state *RoutingProfileState, opts ...pulumi.ResourceOption) (*RoutingProfile, error) { 133 var resource RoutingProfile 134 err := ctx.ReadResource("aws:connect/routingProfile:RoutingProfile", name, id, state, &resource, opts...) 135 if err != nil { 136 return nil, err 137 } 138 return &resource, nil 139 } 140 141 // Input properties used for looking up and filtering RoutingProfile resources. 142 type routingProfileState struct { 143 // The Amazon Resource Name (ARN) of the Routing Profile. 144 Arn *string `pulumi:"arn"` 145 // Specifies the default outbound queue for the Routing Profile. 146 DefaultOutboundQueueId *string `pulumi:"defaultOutboundQueueId"` 147 // Specifies the description of the Routing Profile. 148 Description *string `pulumi:"description"` 149 // Specifies the identifier of the hosting Amazon Connect Instance. 150 InstanceId *string `pulumi:"instanceId"` 151 // One or more `mediaConcurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `mediaConcurrencies` block is documented below. 152 MediaConcurrencies []RoutingProfileMediaConcurrency `pulumi:"mediaConcurrencies"` 153 // Specifies the name of the Routing Profile. 154 Name *string `pulumi:"name"` 155 // One or more `queueConfigs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queueConfigs` block is documented below. 156 QueueConfigs []RoutingProfileQueueConfig `pulumi:"queueConfigs"` 157 // The identifier for the Routing Profile. 158 RoutingProfileId *string `pulumi:"routingProfileId"` 159 // Tags to apply to the Routing 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 map[string]string `pulumi:"tags"` 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 map[string]string `pulumi:"tagsAll"` 166 } 167 168 type RoutingProfileState struct { 169 // The Amazon Resource Name (ARN) of the Routing Profile. 170 Arn pulumi.StringPtrInput 171 // Specifies the default outbound queue for the Routing Profile. 172 DefaultOutboundQueueId pulumi.StringPtrInput 173 // Specifies the description of the Routing Profile. 174 Description pulumi.StringPtrInput 175 // Specifies the identifier of the hosting Amazon Connect Instance. 176 InstanceId pulumi.StringPtrInput 177 // One or more `mediaConcurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `mediaConcurrencies` block is documented below. 178 MediaConcurrencies RoutingProfileMediaConcurrencyArrayInput 179 // Specifies the name of the Routing Profile. 180 Name pulumi.StringPtrInput 181 // One or more `queueConfigs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queueConfigs` block is documented below. 182 QueueConfigs RoutingProfileQueueConfigArrayInput 183 // The identifier for the Routing Profile. 184 RoutingProfileId pulumi.StringPtrInput 185 // Tags to apply to the Routing Profile. If configured with a provider 186 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 187 Tags pulumi.StringMapInput 188 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 189 // 190 // Deprecated: Please use `tags` instead. 191 TagsAll pulumi.StringMapInput 192 } 193 194 func (RoutingProfileState) ElementType() reflect.Type { 195 return reflect.TypeOf((*routingProfileState)(nil)).Elem() 196 } 197 198 type routingProfileArgs struct { 199 // Specifies the default outbound queue for the Routing Profile. 200 DefaultOutboundQueueId string `pulumi:"defaultOutboundQueueId"` 201 // Specifies the description of the Routing Profile. 202 Description string `pulumi:"description"` 203 // Specifies the identifier of the hosting Amazon Connect Instance. 204 InstanceId string `pulumi:"instanceId"` 205 // One or more `mediaConcurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `mediaConcurrencies` block is documented below. 206 MediaConcurrencies []RoutingProfileMediaConcurrency `pulumi:"mediaConcurrencies"` 207 // Specifies the name of the Routing Profile. 208 Name *string `pulumi:"name"` 209 // One or more `queueConfigs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queueConfigs` block is documented below. 210 QueueConfigs []RoutingProfileQueueConfig `pulumi:"queueConfigs"` 211 // Tags to apply to the Routing Profile. If configured with a provider 212 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 213 Tags map[string]string `pulumi:"tags"` 214 } 215 216 // The set of arguments for constructing a RoutingProfile resource. 217 type RoutingProfileArgs struct { 218 // Specifies the default outbound queue for the Routing Profile. 219 DefaultOutboundQueueId pulumi.StringInput 220 // Specifies the description of the Routing Profile. 221 Description pulumi.StringInput 222 // Specifies the identifier of the hosting Amazon Connect Instance. 223 InstanceId pulumi.StringInput 224 // One or more `mediaConcurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `mediaConcurrencies` block is documented below. 225 MediaConcurrencies RoutingProfileMediaConcurrencyArrayInput 226 // Specifies the name of the Routing Profile. 227 Name pulumi.StringPtrInput 228 // One or more `queueConfigs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queueConfigs` block is documented below. 229 QueueConfigs RoutingProfileQueueConfigArrayInput 230 // Tags to apply to the Routing Profile. If configured with a provider 231 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 232 Tags pulumi.StringMapInput 233 } 234 235 func (RoutingProfileArgs) ElementType() reflect.Type { 236 return reflect.TypeOf((*routingProfileArgs)(nil)).Elem() 237 } 238 239 type RoutingProfileInput interface { 240 pulumi.Input 241 242 ToRoutingProfileOutput() RoutingProfileOutput 243 ToRoutingProfileOutputWithContext(ctx context.Context) RoutingProfileOutput 244 } 245 246 func (*RoutingProfile) ElementType() reflect.Type { 247 return reflect.TypeOf((**RoutingProfile)(nil)).Elem() 248 } 249 250 func (i *RoutingProfile) ToRoutingProfileOutput() RoutingProfileOutput { 251 return i.ToRoutingProfileOutputWithContext(context.Background()) 252 } 253 254 func (i *RoutingProfile) ToRoutingProfileOutputWithContext(ctx context.Context) RoutingProfileOutput { 255 return pulumi.ToOutputWithContext(ctx, i).(RoutingProfileOutput) 256 } 257 258 // RoutingProfileArrayInput is an input type that accepts RoutingProfileArray and RoutingProfileArrayOutput values. 259 // You can construct a concrete instance of `RoutingProfileArrayInput` via: 260 // 261 // RoutingProfileArray{ RoutingProfileArgs{...} } 262 type RoutingProfileArrayInput interface { 263 pulumi.Input 264 265 ToRoutingProfileArrayOutput() RoutingProfileArrayOutput 266 ToRoutingProfileArrayOutputWithContext(context.Context) RoutingProfileArrayOutput 267 } 268 269 type RoutingProfileArray []RoutingProfileInput 270 271 func (RoutingProfileArray) ElementType() reflect.Type { 272 return reflect.TypeOf((*[]*RoutingProfile)(nil)).Elem() 273 } 274 275 func (i RoutingProfileArray) ToRoutingProfileArrayOutput() RoutingProfileArrayOutput { 276 return i.ToRoutingProfileArrayOutputWithContext(context.Background()) 277 } 278 279 func (i RoutingProfileArray) ToRoutingProfileArrayOutputWithContext(ctx context.Context) RoutingProfileArrayOutput { 280 return pulumi.ToOutputWithContext(ctx, i).(RoutingProfileArrayOutput) 281 } 282 283 // RoutingProfileMapInput is an input type that accepts RoutingProfileMap and RoutingProfileMapOutput values. 284 // You can construct a concrete instance of `RoutingProfileMapInput` via: 285 // 286 // RoutingProfileMap{ "key": RoutingProfileArgs{...} } 287 type RoutingProfileMapInput interface { 288 pulumi.Input 289 290 ToRoutingProfileMapOutput() RoutingProfileMapOutput 291 ToRoutingProfileMapOutputWithContext(context.Context) RoutingProfileMapOutput 292 } 293 294 type RoutingProfileMap map[string]RoutingProfileInput 295 296 func (RoutingProfileMap) ElementType() reflect.Type { 297 return reflect.TypeOf((*map[string]*RoutingProfile)(nil)).Elem() 298 } 299 300 func (i RoutingProfileMap) ToRoutingProfileMapOutput() RoutingProfileMapOutput { 301 return i.ToRoutingProfileMapOutputWithContext(context.Background()) 302 } 303 304 func (i RoutingProfileMap) ToRoutingProfileMapOutputWithContext(ctx context.Context) RoutingProfileMapOutput { 305 return pulumi.ToOutputWithContext(ctx, i).(RoutingProfileMapOutput) 306 } 307 308 type RoutingProfileOutput struct{ *pulumi.OutputState } 309 310 func (RoutingProfileOutput) ElementType() reflect.Type { 311 return reflect.TypeOf((**RoutingProfile)(nil)).Elem() 312 } 313 314 func (o RoutingProfileOutput) ToRoutingProfileOutput() RoutingProfileOutput { 315 return o 316 } 317 318 func (o RoutingProfileOutput) ToRoutingProfileOutputWithContext(ctx context.Context) RoutingProfileOutput { 319 return o 320 } 321 322 // The Amazon Resource Name (ARN) of the Routing Profile. 323 func (o RoutingProfileOutput) Arn() pulumi.StringOutput { 324 return o.ApplyT(func(v *RoutingProfile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 325 } 326 327 // Specifies the default outbound queue for the Routing Profile. 328 func (o RoutingProfileOutput) DefaultOutboundQueueId() pulumi.StringOutput { 329 return o.ApplyT(func(v *RoutingProfile) pulumi.StringOutput { return v.DefaultOutboundQueueId }).(pulumi.StringOutput) 330 } 331 332 // Specifies the description of the Routing Profile. 333 func (o RoutingProfileOutput) Description() pulumi.StringOutput { 334 return o.ApplyT(func(v *RoutingProfile) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) 335 } 336 337 // Specifies the identifier of the hosting Amazon Connect Instance. 338 func (o RoutingProfileOutput) InstanceId() pulumi.StringOutput { 339 return o.ApplyT(func(v *RoutingProfile) pulumi.StringOutput { return v.InstanceId }).(pulumi.StringOutput) 340 } 341 342 // One or more `mediaConcurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `mediaConcurrencies` block is documented below. 343 func (o RoutingProfileOutput) MediaConcurrencies() RoutingProfileMediaConcurrencyArrayOutput { 344 return o.ApplyT(func(v *RoutingProfile) RoutingProfileMediaConcurrencyArrayOutput { return v.MediaConcurrencies }).(RoutingProfileMediaConcurrencyArrayOutput) 345 } 346 347 // Specifies the name of the Routing Profile. 348 func (o RoutingProfileOutput) Name() pulumi.StringOutput { 349 return o.ApplyT(func(v *RoutingProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 350 } 351 352 // One or more `queueConfigs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queueConfigs` block is documented below. 353 func (o RoutingProfileOutput) QueueConfigs() RoutingProfileQueueConfigArrayOutput { 354 return o.ApplyT(func(v *RoutingProfile) RoutingProfileQueueConfigArrayOutput { return v.QueueConfigs }).(RoutingProfileQueueConfigArrayOutput) 355 } 356 357 // The identifier for the Routing Profile. 358 func (o RoutingProfileOutput) RoutingProfileId() pulumi.StringOutput { 359 return o.ApplyT(func(v *RoutingProfile) pulumi.StringOutput { return v.RoutingProfileId }).(pulumi.StringOutput) 360 } 361 362 // Tags to apply to the Routing Profile. If configured with a provider 363 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 364 func (o RoutingProfileOutput) Tags() pulumi.StringMapOutput { 365 return o.ApplyT(func(v *RoutingProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 366 } 367 368 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 369 // 370 // Deprecated: Please use `tags` instead. 371 func (o RoutingProfileOutput) TagsAll() pulumi.StringMapOutput { 372 return o.ApplyT(func(v *RoutingProfile) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 373 } 374 375 type RoutingProfileArrayOutput struct{ *pulumi.OutputState } 376 377 func (RoutingProfileArrayOutput) ElementType() reflect.Type { 378 return reflect.TypeOf((*[]*RoutingProfile)(nil)).Elem() 379 } 380 381 func (o RoutingProfileArrayOutput) ToRoutingProfileArrayOutput() RoutingProfileArrayOutput { 382 return o 383 } 384 385 func (o RoutingProfileArrayOutput) ToRoutingProfileArrayOutputWithContext(ctx context.Context) RoutingProfileArrayOutput { 386 return o 387 } 388 389 func (o RoutingProfileArrayOutput) Index(i pulumi.IntInput) RoutingProfileOutput { 390 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RoutingProfile { 391 return vs[0].([]*RoutingProfile)[vs[1].(int)] 392 }).(RoutingProfileOutput) 393 } 394 395 type RoutingProfileMapOutput struct{ *pulumi.OutputState } 396 397 func (RoutingProfileMapOutput) ElementType() reflect.Type { 398 return reflect.TypeOf((*map[string]*RoutingProfile)(nil)).Elem() 399 } 400 401 func (o RoutingProfileMapOutput) ToRoutingProfileMapOutput() RoutingProfileMapOutput { 402 return o 403 } 404 405 func (o RoutingProfileMapOutput) ToRoutingProfileMapOutputWithContext(ctx context.Context) RoutingProfileMapOutput { 406 return o 407 } 408 409 func (o RoutingProfileMapOutput) MapIndex(k pulumi.StringInput) RoutingProfileOutput { 410 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RoutingProfile { 411 return vs[0].(map[string]*RoutingProfile)[vs[1].(string)] 412 }).(RoutingProfileOutput) 413 } 414 415 func init() { 416 pulumi.RegisterInputType(reflect.TypeOf((*RoutingProfileInput)(nil)).Elem(), &RoutingProfile{}) 417 pulumi.RegisterInputType(reflect.TypeOf((*RoutingProfileArrayInput)(nil)).Elem(), RoutingProfileArray{}) 418 pulumi.RegisterInputType(reflect.TypeOf((*RoutingProfileMapInput)(nil)).Elem(), RoutingProfileMap{}) 419 pulumi.RegisterOutputType(RoutingProfileOutput{}) 420 pulumi.RegisterOutputType(RoutingProfileArrayOutput{}) 421 pulumi.RegisterOutputType(RoutingProfileMapOutput{}) 422 }