// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package apigateway 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_apigateway_usage_plan_key", usagePlanKeyDataSourceType) } // usagePlanKeyDataSourceType returns the Terraform awscc_apigateway_usage_plan_key data source type. // This Terraform data source type corresponds to the CloudFormation AWS::ApiGateway::UsagePlanKey resource type. func usagePlanKeyDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "id": { // Property: Id // CloudFormation resource type schema: // { // "description": "An autogenerated ID which is a combination of the ID of the key and ID of the usage plan combined with a : such as 123abcdef:abc123.", // "type": "string" // } Description: "An autogenerated ID which is a combination of the ID of the key and ID of the usage plan combined with a : such as 123abcdef:abc123.", Type: types.StringType, Computed: true, }, "key_id": { // Property: KeyId // CloudFormation resource type schema: // { // "description": "The ID of the usage plan key.", // "type": "string" // } Description: "The ID of the usage plan key.", Type: types.StringType, Computed: true, }, "key_type": { // Property: KeyType // CloudFormation resource type schema: // { // "description": "The type of usage plan key. Currently, the only valid key type is API_KEY.", // "enum": [ // "API_KEY" // ], // "type": "string" // } Description: "The type of usage plan key. Currently, the only valid key type is API_KEY.", Type: types.StringType, Computed: true, }, "usage_plan_id": { // Property: UsagePlanId // CloudFormation resource type schema: // { // "description": "The ID of the usage plan.", // "type": "string" // } Description: "The ID of the usage plan.", 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::ApiGateway::UsagePlanKey", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::UsagePlanKey").WithTerraformTypeName("awscc_apigateway_usage_plan_key") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "id": "Id", "key_id": "KeyId", "key_type": "KeyType", "usage_plan_id": "UsagePlanId", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }