// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package connect import ( "context" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" ) func init() { registry.AddDataSourceTypeFactory("awscc_connect_phone_number", phoneNumberDataSourceType) } // phoneNumberDataSourceType returns the Terraform awscc_connect_phone_number data source type. // This Terraform data source type corresponds to the CloudFormation AWS::Connect::PhoneNumber resource type. func phoneNumberDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "address": { // Property: Address // CloudFormation resource type schema: // { // "description": "The phone number e164 address.", // "pattern": "^\\+[0-9]{2,15}", // "type": "string" // } Description: "The phone number e164 address.", Type: types.StringType, Computed: true, }, "country_code": { // Property: CountryCode // CloudFormation resource type schema: // { // "description": "The phone number country code.", // "pattern": "^[A-Z]{2}", // "type": "string" // } Description: "The phone number country code.", Type: types.StringType, Computed: true, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The description of the phone number.", // "maxLength": 500, // "minLength": 1, // "type": "string" // } Description: "The description of the phone number.", Type: types.StringType, Computed: true, }, "phone_number_arn": { // Property: PhoneNumberArn // CloudFormation resource type schema: // { // "description": "The phone number ARN", // "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:phone-number/[-a-zA-Z0-9]*$", // "type": "string" // } Description: "The phone number ARN", Type: types.StringType, Computed: true, }, "prefix": { // Property: Prefix // CloudFormation resource type schema: // { // "description": "The phone number prefix.", // "pattern": "^\\+[0-9]{1,15}", // "type": "string" // } Description: "The phone number prefix.", Type: types.StringType, Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "One or more tags.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "description": "A key-value pair to associate with a resource.", // "properties": { // "Key": { // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", // "maxLength": 128, // "minLength": 1, // "pattern": "", // "type": "string" // }, // "Value": { // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", // "maxLength": 256, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "maxItems": 50, // "type": "array", // "uniqueItems": true // } Description: "One or more tags.", Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", Type: types.StringType, Computed: true, }, "value": { // Property: Value Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", Type: types.StringType, Computed: true, }, }, tfsdk.SetNestedAttributesOptions{}, ), Computed: true, }, "target_arn": { // Property: TargetArn // CloudFormation resource type schema: // { // "description": "The ARN of the Amazon Connect instance the phone number is claimed to.", // "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$", // "type": "string" // } Description: "The ARN of the Amazon Connect instance the phone number is claimed to.", Type: types.StringType, Computed: true, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "description": "The phone number type, either TOLL_FREE or DID.", // "pattern": "TOLL_FREE|DID", // "type": "string" // } Description: "The phone number type, either TOLL_FREE or DID.", Type: types.StringType, Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::Connect::PhoneNumber", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Connect::PhoneNumber").WithTerraformTypeName("awscc_connect_phone_number") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "country_code": "CountryCode", "description": "Description", "key": "Key", "phone_number_arn": "PhoneNumberArn", "prefix": "Prefix", "tags": "Tags", "target_arn": "TargetArn", "type": "Type", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }