// Code generated by generators/resource/main.go; DO NOT EDIT. package ses 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_ses_contact_list", contactListResourceType) } // contactListResourceType returns the Terraform awscc_ses_contact_list resource type. // This Terraform resource type corresponds to the CloudFormation AWS::SES::ContactList resource type. func contactListResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "contact_list_name": { // Property: ContactListName // CloudFormation resource type schema: // { // "description": "The name of the contact list.", // "pattern": "^[a-zA-Z0-9_-]{1,64}$", // "type": "string" // } Description: "The name of the contact list.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9_-]{1,64}$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The description of the contact list.", // "maxLength": 500, // "type": "string" // } Description: "The description of the contact list.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(500), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "The tags (keys and values) associated with the contact list.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "maxLength": 128, // "minLength": 1, // "type": "string" // }, // "Value": { // "maxLength": 256, // "minLength": 0, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "maxItems": 50, // "minItems": 0, // "type": "array" // } Description: "The tags (keys and values) associated with the contact list.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, }, "value": { // Property: Value Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 256), }, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenBetween(0, 50), }, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "topics": { // Property: Topics // CloudFormation resource type schema: // { // "description": "The topics associated with the contact list.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "DefaultSubscriptionStatus": { // "type": "string" // }, // "Description": { // "description": "The description of the topic.", // "maxLength": 500, // "minLength": 0, // "type": "string" // }, // "DisplayName": { // "description": "The display name of the topic.", // "maxLength": 128, // "minLength": 0, // "type": "string" // }, // "TopicName": { // "description": "The name of the topic.", // "pattern": "^[a-zA-Z0-9_-]{1,64}$", // "type": "string" // } // }, // "required": [ // "TopicName", // "DisplayName", // "DefaultSubscriptionStatus" // ], // "type": "object" // }, // "maxItems": 20, // "minItems": 0, // "type": "array" // } Description: "The topics associated with the contact list.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "default_subscription_status": { // Property: DefaultSubscriptionStatus Type: types.StringType, Required: true, }, "description": { // Property: Description Description: "The description of the topic.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 500), }, }, "display_name": { // Property: DisplayName Description: "The display name of the topic.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 128), }, }, "topic_name": { // Property: TopicName Description: "The name of the topic.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9_-]{1,64}$"), ""), }, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenBetween(0, 20), }, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Resource schema for AWS::SES::ContactList.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::SES::ContactList").WithTerraformTypeName("awscc_ses_contact_list") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "contact_list_name": "ContactListName", "default_subscription_status": "DefaultSubscriptionStatus", "description": "Description", "display_name": "DisplayName", "key": "Key", "tags": "Tags", "topic_name": "TopicName", "topics": "Topics", "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 }