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