// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package lambda 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_lambda_url", urlDataSourceType) } // urlDataSourceType returns the Terraform awscc_lambda_url data source type. // This Terraform data source type corresponds to the CloudFormation AWS::Lambda::Url resource type. func urlDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "auth_type": { // Property: AuthType // CloudFormation resource type schema: // { // "description": "Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.", // "enum": [ // "AWS_IAM", // "NONE" // ], // "type": "string" // } Description: "Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL.", Type: types.StringType, Computed: true, }, "cors": { // Property: Cors // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "AllowCredentials": { // "description": "Specifies whether credentials are included in the CORS request.", // "type": "boolean" // }, // "AllowHeaders": { // "description": "Represents a collection of allowed headers.", // "insertionOrder": true, // "items": { // "maxLength": 1024, // "minLength": 1, // "type": "string" // }, // "maxItems": 100, // "minItems": 1, // "type": "array" // }, // "AllowMethods": { // "description": "Represents a collection of allowed HTTP methods.", // "insertionOrder": true, // "items": { // "enum": [ // "GET", // "PUT", // "HEAD", // "POST", // "PATCH", // "DELETE", // "*" // ], // "type": "string" // }, // "maxItems": 6, // "minItems": 1, // "type": "array" // }, // "AllowOrigins": { // "description": "Represents a collection of allowed origins.", // "insertionOrder": true, // "items": { // "maxLength": 253, // "minLength": 1, // "type": "string" // }, // "maxItems": 100, // "minItems": 1, // "type": "array" // }, // "ExposeHeaders": { // "description": "Represents a collection of exposed headers.", // "insertionOrder": true, // "items": { // "maxLength": 1024, // "minLength": 1, // "type": "string" // }, // "maxItems": 100, // "minItems": 1, // "type": "array" // }, // "MaxAge": { // "maximum": 86400, // "minimum": 0, // "type": "integer" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "allow_credentials": { // Property: AllowCredentials Description: "Specifies whether credentials are included in the CORS request.", Type: types.BoolType, Computed: true, }, "allow_headers": { // Property: AllowHeaders Description: "Represents a collection of allowed headers.", Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "allow_methods": { // Property: AllowMethods Description: "Represents a collection of allowed HTTP methods.", Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "allow_origins": { // Property: AllowOrigins Description: "Represents a collection of allowed origins.", Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "expose_headers": { // Property: ExposeHeaders Description: "Represents a collection of exposed headers.", Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "max_age": { // Property: MaxAge Type: types.Int64Type, Computed: true, }, }, ), Computed: true, }, "function_arn": { // Property: FunctionArn // CloudFormation resource type schema: // { // "description": "The full Amazon Resource Name (ARN) of the function associated with the Function URL.", // "pattern": "", // "type": "string" // } Description: "The full Amazon Resource Name (ARN) of the function associated with the Function URL.", Type: types.StringType, Computed: true, }, "function_url": { // Property: FunctionUrl // CloudFormation resource type schema: // { // "description": "The generated url for this resource.", // "type": "string" // } Description: "The generated url for this resource.", Type: types.StringType, Computed: true, }, "qualifier": { // Property: Qualifier // CloudFormation resource type schema: // { // "description": "The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.", // "maxLength": 128, // "minLength": 1, // "pattern": "", // "type": "string" // } Description: "The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed.", Type: types.StringType, Computed: true, }, "target_function_arn": { // Property: TargetFunctionArn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of the function associated with the Function URL.", // "pattern": "", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of the function associated with the Function URL.", Type: types.StringType, 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::Lambda::Url", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Lambda::Url").WithTerraformTypeName("awscc_lambda_url") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "allow_credentials": "AllowCredentials", "allow_headers": "AllowHeaders", "allow_methods": "AllowMethods", "allow_origins": "AllowOrigins", "auth_type": "AuthType", "cors": "Cors", "expose_headers": "ExposeHeaders", "function_arn": "FunctionArn", "function_url": "FunctionUrl", "max_age": "MaxAge", "qualifier": "Qualifier", "target_function_arn": "TargetFunctionArn", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }