// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package backup import ( "context" "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" ) func init() { registry.AddDataSourceTypeFactory("awscc_backup_backup_vault", backupVaultDataSourceType) } // backupVaultDataSourceType returns the Terraform awscc_backup_backup_vault data source type. // This Terraform data source type corresponds to the CloudFormation AWS::Backup::BackupVault resource type. func backupVaultDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "access_policy": { // Property: AccessPolicy // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "backup_vault_arn": { // Property: BackupVaultArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "backup_vault_name": { // Property: BackupVaultName // CloudFormation resource type schema: // { // "pattern": "^[a-zA-Z0-9\\-\\_]{2,50}$", // "type": "string" // } Type: types.StringType, Computed: true, }, "backup_vault_tags": { // Property: BackupVaultTags // CloudFormation resource type schema: // { // "additionalProperties": false, // "patternProperties": { // "": { // "type": "string" // } // }, // "type": "object" // } // Pattern: "" Type: types.MapType{ElemType: types.StringType}, Computed: true, }, "encryption_key_arn": { // Property: EncryptionKeyArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "lock_configuration": { // Property: LockConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "ChangeableForDays": { // "type": "number" // }, // "MaxRetentionDays": { // "type": "number" // }, // "MinRetentionDays": { // "type": "number" // } // }, // "required": [ // "MinRetentionDays" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "changeable_for_days": { // Property: ChangeableForDays Type: types.Float64Type, Computed: true, }, "max_retention_days": { // Property: MaxRetentionDays Type: types.Float64Type, Computed: true, }, "min_retention_days": { // Property: MinRetentionDays Type: types.Float64Type, Computed: true, }, }, ), Computed: true, }, "notifications": { // Property: Notifications // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "BackupVaultEvents": { // "insertionOrder": false, // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "SNSTopicArn": { // "type": "string" // } // }, // "required": [ // "SNSTopicArn", // "BackupVaultEvents" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "backup_vault_events": { // Property: BackupVaultEvents Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "sns_topic_arn": { // Property: SNSTopicArn Type: types.StringType, Computed: true, }, }, ), Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::Backup::BackupVault", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Backup::BackupVault").WithTerraformTypeName("awscc_backup_backup_vault") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "access_policy": "AccessPolicy", "backup_vault_arn": "BackupVaultArn", "backup_vault_events": "BackupVaultEvents", "backup_vault_name": "BackupVaultName", "backup_vault_tags": "BackupVaultTags", "changeable_for_days": "ChangeableForDays", "encryption_key_arn": "EncryptionKeyArn", "lock_configuration": "LockConfiguration", "max_retention_days": "MaxRetentionDays", "min_retention_days": "MinRetentionDays", "notifications": "Notifications", "sns_topic_arn": "SNSTopicArn", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }