// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package ce 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_ce_anomaly_subscription", anomalySubscriptionDataSourceType) } // anomalySubscriptionDataSourceType returns the Terraform awscc_ce_anomaly_subscription data source type. // This Terraform data source type corresponds to the CloudFormation AWS::CE::AnomalySubscription resource type. func anomalySubscriptionDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "account_id": { // Property: AccountId // CloudFormation resource type schema: // { // "description": "The accountId", // "maxLength": 1024, // "minLength": 0, // "type": "string" // } Description: "The accountId", Type: types.StringType, Computed: true, }, "frequency": { // Property: Frequency // CloudFormation resource type schema: // { // "description": "The frequency at which anomaly reports are sent over email. ", // "enum": [ // "DAILY", // "IMMEDIATE", // "WEEKLY" // ], // "type": "string" // } Description: "The frequency at which anomaly reports are sent over email. ", Type: types.StringType, Computed: true, }, "monitor_arn_list": { // Property: MonitorArnList // CloudFormation resource type schema: // { // "description": "A list of cost anomaly monitors.", // "insertionOrder": false, // "items": { // "description": "Subscription ARN", // "pattern": "^arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:[-a-zA-Z0-9/:_]+$", // "type": "string" // }, // "type": "array" // } Description: "A list of cost anomaly monitors.", Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "resource_tags": { // Property: ResourceTags // CloudFormation resource type schema: // { // "description": "Tags to assign to subscription.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "description": "A key-value pair to associate with a resource.", // "properties": { // "Key": { // "description": "The key name for the tag.", // "maxLength": 128, // "minLength": 1, // "pattern": "", // "type": "string" // }, // "Value": { // "description": "The value for the tag.", // "maxLength": 256, // "minLength": 0, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "maxItems": 200, // "minItems": 0, // "type": "array" // } Description: "Tags to assign to subscription.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key name for the tag.", Type: types.StringType, Computed: true, }, "value": { // Property: Value Description: "The value for the tag.", Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "subscribers": { // Property: Subscribers // CloudFormation resource type schema: // { // "description": "A list of subscriber", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Address": { // "pattern": "(^[a-zA-Z0-9.!#$%\u0026'*+=?^_‘{|}~-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$)|(^arn:(aws[a-zA-Z-]*):sns:[a-zA-Z0-9-]+:[0-9]{12}:[a-zA-Z0-9_-]+(\\.fifo)?$)", // "type": "string" // }, // "Status": { // "enum": [ // "CONFIRMED", // "DECLINED" // ], // "type": "string" // }, // "Type": { // "enum": [ // "EMAIL", // "SNS" // ], // "type": "string" // } // }, // "required": [ // "Address", // "Type" // ], // "type": "object" // }, // "type": "array" // } Description: "A list of subscriber", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "address": { // Property: Address Type: types.StringType, Computed: true, }, "status": { // Property: Status Type: types.StringType, Computed: true, }, "type": { // Property: Type Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "subscription_arn": { // Property: SubscriptionArn // CloudFormation resource type schema: // { // "description": "Subscription ARN", // "pattern": "^arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:[-a-zA-Z0-9/:_]+$", // "type": "string" // } Description: "Subscription ARN", Type: types.StringType, Computed: true, }, "subscription_name": { // Property: SubscriptionName // CloudFormation resource type schema: // { // "description": "The name of the subscription.", // "maxLength": 1024, // "minLength": 0, // "pattern": "[\\S\\s]*", // "type": "string" // } Description: "The name of the subscription.", Type: types.StringType, Computed: true, }, "threshold": { // Property: Threshold // CloudFormation resource type schema: // { // "description": "The dollar value that triggers a notification if the threshold is exceeded. ", // "minimum": 0, // "type": "number" // } Description: "The dollar value that triggers a notification if the threshold is exceeded. ", Type: types.Float64Type, 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::CE::AnomalySubscription", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::CE::AnomalySubscription").WithTerraformTypeName("awscc_ce_anomaly_subscription") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "address": "Address", "frequency": "Frequency", "key": "Key", "monitor_arn_list": "MonitorArnList", "resource_tags": "ResourceTags", "status": "Status", "subscribers": "Subscribers", "subscription_arn": "SubscriptionArn", "subscription_name": "SubscriptionName", "threshold": "Threshold", "type": "Type", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }