// Code generated by generators/resource/main.go; DO NOT EDIT. package sagemaker 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_sagemaker_project", projectResourceType) } // projectResourceType returns the Terraform awscc_sagemaker_project resource type. // This Terraform resource type corresponds to the CloudFormation AWS::SageMaker::Project resource type. func projectResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "creation_time": { // Property: CreationTime // CloudFormation resource type schema: // { // "description": "The time at which the project was created.", // "type": "string" // } Description: "The time at which the project was created.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "project_arn": { // Property: ProjectArn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of the Project.", // "maxLength": 2048, // "minLength": 1, // "pattern": "arn:aws[a-z\\-]*:sagemaker:[a-z0-9\\-]*:[0-9]{12}:project.*", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of the Project.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "project_description": { // Property: ProjectDescription // CloudFormation resource type schema: // { // "description": "The description of the project.", // "maxLength": 1024, // "pattern": ".*", // "type": "string" // } Description: "The description of the project.", Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(1024), validate.StringMatch(regexp.MustCompile(".*"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "project_id": { // Property: ProjectId // CloudFormation resource type schema: // { // "description": "Project Id.", // "maxLength": 20, // "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*", // "type": "string" // } Description: "Project Id.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "project_name": { // Property: ProjectName // CloudFormation resource type schema: // { // "description": "The name of the project.", // "maxLength": 32, // "minLength": 1, // "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$", // "type": "string" // } Description: "The name of the project.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 32), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "project_status": { // Property: ProjectStatus // CloudFormation resource type schema: // { // "description": "The status of a project.", // "enum": [ // "Pending", // "CreateInProgress", // "CreateCompleted", // "CreateFailed", // "DeleteInProgress", // "DeleteFailed", // "DeleteCompleted" // ], // "type": "string" // } Description: "The status of a project.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "service_catalog_provisioned_product_details": { // Property: ServiceCatalogProvisionedProductDetails // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "Provisioned ServiceCatalog Details", // "properties": { // "ProvisionedProductId": { // "description": "The identifier of the provisioning artifact (also known as a version).", // "maxLength": 100, // "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$", // "type": "string" // }, // "ProvisionedProductStatusMessage": { // "description": "Provisioned Product Status Message", // "type": "string" // } // }, // "type": "object" // } Description: "Provisioned ServiceCatalog Details", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "provisioned_product_id": { // Property: ProvisionedProductId Description: "The identifier of the provisioning artifact (also known as a version).", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(100), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"), ""), }, }, "provisioned_product_status_message": { // Property: ProvisionedProductStatusMessage Description: "Provisioned Product Status Message", Type: types.StringType, Optional: true, }, }, ), Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "service_catalog_provisioning_details": { // Property: ServiceCatalogProvisioningDetails // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "Input ServiceCatalog Provisioning Details", // "properties": { // "PathId": { // "description": "The path identifier of the product.", // "maxLength": 100, // "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$", // "type": "string" // }, // "ProductId": { // "description": "Service Catalog product identifier.", // "maxLength": 100, // "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$", // "type": "string" // }, // "ProvisioningArtifactId": { // "description": "The identifier of the provisioning artifact (also known as a version).", // "maxLength": 100, // "pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$", // "type": "string" // }, // "ProvisioningParameters": { // "description": "Parameters specified by the administrator that are required for provisioning the product.", // "items": { // "additionalProperties": false, // "description": "Information about a parameter used to provision a product.", // "properties": { // "Key": { // "description": "The parameter key.", // "maxLength": 1000, // "minLength": 1, // "pattern": ".*", // "type": "string" // }, // "Value": { // "description": "The parameter value.", // "maxLength": 4096, // "pattern": ".*", // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array" // } // }, // "required": [ // "ProductId" // ], // "type": "object" // } Description: "Input ServiceCatalog Provisioning Details", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "path_id": { // Property: PathId Description: "The path identifier of the product.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(100), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"), ""), }, }, "product_id": { // Property: ProductId Description: "Service Catalog product identifier.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(100), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"), ""), }, }, "provisioning_artifact_id": { // Property: ProvisioningArtifactId Description: "The identifier of the provisioning artifact (also known as a version).", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(100), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9](-*[a-zA-Z0-9])*$"), ""), }, }, "provisioning_parameters": { // Property: ProvisioningParameters Description: "Parameters specified by the administrator that are required for provisioning the product.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The parameter key.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1000), validate.StringMatch(regexp.MustCompile(".*"), ""), }, }, "value": { // Property: Value Description: "The parameter value.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtMost(4096), validate.StringMatch(regexp.MustCompile(".*"), ""), }, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, }, }, ), Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "An array of key-value pairs to apply to this resource.", // "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 127 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": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", // "type": "string" // }, // "Value": { // "description": "The value for the tag. You can specify a value that is 1 to 255 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, // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "maxItems": 40, // "type": "array" // } Description: "An array of key-value pairs to apply to this resource.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key name of the tag. You can specify a value that is 1 to 127 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), validate.StringMatch(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), }, }, "value": { // Property: Value Description: "The value for the tag. You can specify a value that is 1 to 255 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), validate.StringMatch(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), }, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenAtMost(40), }, 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::SageMaker::Project", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Project").WithTerraformTypeName("awscc_sagemaker_project") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "key": "Key", "path_id": "PathId", "product_id": "ProductId", "project_arn": "ProjectArn", "project_description": "ProjectDescription", "project_id": "ProjectId", "project_name": "ProjectName", "project_status": "ProjectStatus", "provisioned_product_id": "ProvisionedProductId", "provisioned_product_status_message": "ProvisionedProductStatusMessage", "provisioning_artifact_id": "ProvisioningArtifactId", "provisioning_parameters": "ProvisioningParameters", "service_catalog_provisioned_product_details": "ServiceCatalogProvisionedProductDetails", "service_catalog_provisioning_details": "ServiceCatalogProvisioningDetails", "tags": "Tags", "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 }