// Code generated by generators/resource/main.go; DO NOT EDIT. package personalize 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_personalize_dataset_group", datasetGroupResourceType) } // datasetGroupResourceType returns the Terraform awscc_personalize_dataset_group resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Personalize::DatasetGroup resource type. func datasetGroupResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "dataset_group_arn": { // Property: DatasetGroupArn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of the dataset group.", // "maxLength": 256, // "pattern": "arn:([a-z\\d-]+):personalize:.*:.*:.+", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of the dataset group.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "domain": { // Property: Domain // CloudFormation resource type schema: // { // "description": "The domain of a Domain dataset group.", // "enum": [ // "ECOMMERCE", // "VIDEO_ON_DEMAND" // ], // "type": "string" // } Description: "The domain of a Domain dataset group.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "ECOMMERCE", "VIDEO_ON_DEMAND", }), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "kms_key_arn": { // Property: KmsKeyArn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name(ARN) of a AWS Key Management Service (KMS) key used to encrypt the datasets.", // "maxLength": 2048, // "pattern": "arn:aws.*:kms:.*:[0-9]{12}:key/.*", // "type": "string" // } Description: "The Amazon Resource Name(ARN) of a AWS Key Management Service (KMS) key used to encrypt the datasets.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(2048), validate.StringMatch(regexp.MustCompile("arn:aws.*:kms:.*:[0-9]{12}:key/.*"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "The name for the new dataset group.", // "maxLength": 63, // "minLength": 1, // "pattern": "^[a-zA-Z0-9][a-zA-Z0-9\\-_]*", // "type": "string" // } Description: "The name for the new dataset group.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 63), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9\\-_]*"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "role_arn": { // Property: RoleArn // CloudFormation resource type schema: // { // "description": "The ARN of the AWS Identity and Access Management (IAM) role that has permissions to access the AWS Key Management Service (KMS) key. Supplying an IAM role is only valid when also specifying a KMS key.", // "maxLength": 256, // "minLength": 0, // "pattern": "arn:([a-z\\d-]+):iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+", // "type": "string" // } Description: "The ARN of the AWS Identity and Access Management (IAM) role that has permissions to access the AWS Key Management Service (KMS) key. Supplying an IAM role is only valid when also specifying a KMS key.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 256), validate.StringMatch(regexp.MustCompile("arn:([a-z\\d-]+):iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+"), ""), }, 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 Schema for AWS::Personalize::DatasetGroup.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Personalize::DatasetGroup").WithTerraformTypeName("awscc_personalize_dataset_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dataset_group_arn": "DatasetGroupArn", "domain": "Domain", "kms_key_arn": "KmsKeyArn", "name": "Name", "role_arn": "RoleArn", }) opts = opts.IsImmutableType(true) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }