// Code generated by generators/resource/main.go; DO NOT EDIT. package connect import ( "context" "regexp" "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" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_connect_contact_flow", contactFlowResourceType) } // contactFlowResourceType returns the Terraform awscc_connect_contact_flow resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Connect::ContactFlow resource type. func contactFlowResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "contact_flow_arn": { // Property: ContactFlowArn // CloudFormation resource type schema: // { // "description": "The identifier of the contact flow (ARN).", // "maxLength": 500, // "minLength": 1, // "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*/contact-flow/[-a-zA-Z0-9]*$", // "type": "string" // } Description: "The identifier of the contact flow (ARN).", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "content": { // Property: Content // CloudFormation resource type schema: // { // "description": "The content of the contact flow in JSON format.", // "maxLength": 256000, // "minLength": 1, // "type": "string" // } Description: "The content of the contact flow in JSON format.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256000), }, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The description of the contact flow.", // "maxLength": 500, // "type": "string" // } Description: "The description of the contact flow.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(500), }, }, "instance_arn": { // Property: InstanceArn // CloudFormation resource type schema: // { // "description": "The identifier of the Amazon Connect instance (ARN).", // "maxLength": 256, // "minLength": 1, // "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$", // "type": "string" // } Description: "The identifier of the Amazon Connect instance (ARN).", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), validate.StringMatch(regexp.MustCompile("^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$"), ""), }, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "The name of the contact flow.", // "maxLength": 127, // "minLength": 1, // "type": "string" // } Description: "The name of the contact flow.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 127), }, }, "state": { // Property: State // CloudFormation resource type schema: // { // "description": "The state of the contact flow.", // "enum": [ // "ACTIVE", // "ARCHIVED" // ], // "type": "string" // } Description: "The state of the contact flow.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "ACTIVE", "ARCHIVED", }), }, }, "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 maximum of 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, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, }, "value": { // Property: Value Description: "The value for the tag. . You can specify a value that is maximum of 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, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(256), }, }, }, tfsdk.SetNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenAtMost(50), }, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "description": "The type of the contact flow.", // "enum": [ // "CONTACT_FLOW", // "CUSTOMER_QUEUE", // "CUSTOMER_HOLD", // "CUSTOMER_WHISPER", // "AGENT_HOLD", // "AGENT_WHISPER", // "OUTBOUND_WHISPER", // "AGENT_TRANSFER", // "QUEUE_TRANSFER" // ], // "type": "string" // } Description: "The type of the contact flow.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "CONTACT_FLOW", "CUSTOMER_QUEUE", "CUSTOMER_HOLD", "CUSTOMER_WHISPER", "AGENT_HOLD", "AGENT_WHISPER", "OUTBOUND_WHISPER", "AGENT_TRANSFER", "QUEUE_TRANSFER", }), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::Connect::ContactFlow", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Connect::ContactFlow").WithTerraformTypeName("awscc_connect_contact_flow") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "contact_flow_arn": "ContactFlowArn", "content": "Content", "description": "Description", "instance_arn": "InstanceArn", "key": "Key", "name": "Name", "state": "State", "tags": "Tags", "type": "Type", "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }