// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package cloudfront 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_cloudfront_realtime_log_config", realtimeLogConfigDataSourceType) } // realtimeLogConfigDataSourceType returns the Terraform awscc_cloudfront_realtime_log_config data source type. // This Terraform data source type corresponds to the CloudFormation AWS::CloudFront::RealtimeLogConfig resource type. func realtimeLogConfigDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "end_points": { // Property: EndPoints // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "KinesisStreamConfig": { // "additionalProperties": false, // "properties": { // "RoleArn": { // "type": "string" // }, // "StreamArn": { // "type": "string" // } // }, // "required": [ // "RoleArn", // "StreamArn" // ], // "type": "object" // }, // "StreamType": { // "type": "string" // } // }, // "required": [ // "KinesisStreamConfig", // "StreamType" // ], // "type": "object" // }, // "minItems": 1, // "type": "array", // "uniqueItems": false // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "kinesis_stream_config": { // Property: KinesisStreamConfig Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "role_arn": { // Property: RoleArn Type: types.StringType, Computed: true, }, "stream_arn": { // Property: StreamArn Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "stream_type": { // Property: StreamType Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "fields": { // Property: Fields // CloudFormation resource type schema: // { // "items": { // "type": "string" // }, // "minItems": 1, // "type": "array", // "uniqueItems": false // } Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "name": { // Property: Name // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, }, "sampling_rate": { // Property: SamplingRate // CloudFormation resource type schema: // { // "maximum": 100, // "minimum": 1, // "type": "number" // } 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::CloudFront::RealtimeLogConfig", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::CloudFront::RealtimeLogConfig").WithTerraformTypeName("awscc_cloudfront_realtime_log_config") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "end_points": "EndPoints", "fields": "Fields", "kinesis_stream_config": "KinesisStreamConfig", "name": "Name", "role_arn": "RoleArn", "sampling_rate": "SamplingRate", "stream_arn": "StreamArn", "stream_type": "StreamType", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }