// Code generated by generators/resource/main.go; DO NOT EDIT. package nimblestudio 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_nimblestudio_streaming_image", streamingImageResourceType) } // streamingImageResourceType returns the Terraform awscc_nimblestudio_streaming_image resource type. // This Terraform resource type corresponds to the CloudFormation AWS::NimbleStudio::StreamingImage resource type. func streamingImageResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "\u003cp\u003eA human-readable description of the streaming image.\u003c/p\u003e", // "maxLength": 256, // "minLength": 0, // "type": "string" // } Description: "
A human-readable description of the streaming image.
", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 256), }, }, "ec_2_image_id": { // Property: Ec2ImageId // CloudFormation resource type schema: // { // "description": "\u003cp\u003eThe ID of an EC2 machine image with which to create this streaming image.\u003c/p\u003e", // "pattern": "^ami-[0-9A-z]+$", // "type": "string" // } Description: "The ID of an EC2 machine image with which to create this streaming image.
", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringMatch(regexp.MustCompile("^ami-[0-9A-z]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "encryption_configuration": { // Property: EncryptionConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "\u003cp\u003eTODO\u003c/p\u003e", // "properties": { // "KeyArn": { // "description": "\u003cp\u003eThe ARN for a KMS key that is used to encrypt studio data.\u003c/p\u003e", // "minLength": 4, // "pattern": "^arn:.*", // "type": "string" // }, // "KeyType": { // "description": "\u003cp/\u003e", // "enum": [ // "CUSTOMER_MANAGED_KEY" // ], // "type": "string" // } // }, // "required": [ // "KeyType" // ], // "type": "object" // } Description: "TODO
", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "key_arn": { // Property: KeyArn Description: "The ARN for a KMS key that is used to encrypt studio data.
", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenAtLeast(4), validate.StringMatch(regexp.MustCompile("^arn:.*"), ""), }, }, "key_type": { // Property: KeyType Description: "", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "CUSTOMER_MANAGED_KEY", }), }, }, }, ), Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "eula_ids": { // Property: EulaIds // CloudFormation resource type schema: // { // "description": "\u003cp\u003eThe list of EULAs that must be accepted before a Streaming Session can be started using this streaming image.\u003c/p\u003e", // "items": { // "type": "string" // }, // "type": "array" // } Description: "The list of EULAs that must be accepted before a Streaming Session can be started using this streaming image.
", Type: types.ListType{ElemType: types.StringType}, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "description": "\u003cp\u003eA friendly name for a streaming image resource.\u003c/p\u003e", // "maxLength": 64, // "minLength": 0, // "type": "string" // } Description: "A friendly name for a streaming image resource.
", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 64), }, }, "owner": { // Property: Owner // CloudFormation resource type schema: // { // "description": "\u003cp\u003eThe owner of the streaming image, either the studioId that contains the streaming image, or 'amazon' for images that are provided by Amazon Nimble Studio.\u003c/p\u003e", // "type": "string" // } Description: "The owner of the streaming image, either the studioId that contains the streaming image, or 'amazon' for images that are provided by Amazon Nimble Studio.
", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "platform": { // Property: Platform // CloudFormation resource type schema: // { // "description": "\u003cp\u003eThe platform of the streaming image, either WINDOWS or LINUX.\u003c/p\u003e", // "pattern": "^[a-zA-Z]*$", // "type": "string" // } Description: "The platform of the streaming image, either WINDOWS or LINUX.
", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "streaming_image_id": { // Property: StreamingImageId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "studio_id": { // Property: StudioId // CloudFormation resource type schema: // { // "description": "\u003cp\u003eThe studioId. \u003c/p\u003e", // "type": "string" // } Description: "The studioId.
", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "", // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // } Description: "", // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Optional: true, Computed: true, 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: "Represents a streaming session machine image that can be used to launch a streaming session", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::NimbleStudio::StreamingImage").WithTerraformTypeName("awscc_nimblestudio_streaming_image") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "ec_2_image_id": "Ec2ImageId", "encryption_configuration": "EncryptionConfiguration", "eula_ids": "EulaIds", "key_arn": "KeyArn", "key_type": "KeyType", "name": "Name", "owner": "Owner", "platform": "Platform", "streaming_image_id": "StreamingImageId", "studio_id": "StudioId", "tags": "Tags", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }