Skip to content

Commit 190ef14

Browse files
- Uplifteed aws.
1 parent 8008fdb commit 190ef14

File tree

2 files changed

+56
-83
lines changed

2 files changed

+56
-83
lines changed

test/registry/src/aws/v0.1.0/services/cloud_control.yaml

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.0
22
info:
33
version: '2021-09-30'
44
x-release: v4
5-
title: AWS Cloud Control API
5+
title: AWS Cloud Control api
66
description: 'For more information about Amazon Web Services Cloud Control API, see the <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/what-is-cloudcontrolapi.html">Amazon Web Services Cloud Control API User Guide</a>.'
77
x-logo:
88
url: 'https://twitter.com/awscloud/profile_image?size=original'
@@ -430,9 +430,10 @@ paths:
430430
schema:
431431
properties:
432432
MaxResults:
433+
# $ref: '#/components/schemas/MaxResults'
433434
type: integer
434435
maximum: 100
435-
minimum: 1
436+
minimum: 1
436437
NextToken:
437438
$ref: '#/components/schemas/NextToken'
438439
ResourceModel:
@@ -522,8 +523,35 @@ paths:
522523
description: Success
523524
components:
524525
x-stackQL-resources:
526+
resource:
527+
name: resource
528+
x-cfn-schema-name: ResourceDescription
529+
x-example-where-clause: WHERE region = 'us-east-1' AND data__TypeName = '<TypeName>' AND data__Identifier = '<Identifier>'
530+
x-type: native
531+
methods:
532+
get_resource:
533+
operation:
534+
$ref: '#/paths/~1?Action=GetResource&Version=2021-09-30/post'
535+
request:
536+
mediaType: application/x-amz-json-1.0
537+
response:
538+
mediaType: application/json
539+
objectKey: '$.ResourceDescription'
540+
openAPIDocKey: '200'
541+
id: aws.cloud_control.resources
542+
sqlVerbs:
543+
delete: []
544+
insert: []
545+
select:
546+
- $ref: '#/components/x-stackQL-resources/resource/methods/get_resource'
547+
update: []
548+
title: resource
525549
resources:
526550
name: resources
551+
x-cfn-schema-name: ResourceDescriptions
552+
x-example-where-clause: WHERE region = 'us-east-1' AND data__TypeName = '<TypeName>'
553+
x-description: 'For more information about Amazon Web Services Cloud Control API, see the <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/what-is-cloudcontrolapi.html">Amazon Web Services Cloud Control API User Guide</a>.'
554+
x-type: native
527555
methods:
528556
list_resources:
529557
operation:
@@ -550,15 +578,6 @@ components:
550578
response:
551579
mediaType: application/json
552580
openAPIDocKey: '200'
553-
get_resource:
554-
operation:
555-
$ref: '#/paths/~1?Action=GetResource&Version=2021-09-30/post'
556-
request:
557-
mediaType: application/x-amz-json-1.0
558-
response:
559-
mediaType: application/json
560-
objectKey: '$.ResourceDescription'
561-
openAPIDocKey: '200'
562581
update_resource:
563582
operation:
564583
$ref: '#/paths/~1?Action=UpdateResource&Version=2021-09-30/post'
@@ -574,30 +593,40 @@ components:
574593
insert:
575594
- $ref: '#/components/x-stackQL-resources/resources/methods/create_resource'
576595
select:
577-
- $ref: '#/components/x-stackQL-resources/resources/methods/get_resource'
578596
- $ref: '#/components/x-stackQL-resources/resources/methods/list_resources'
579597
update:
580598
- $ref: '#/components/x-stackQL-resources/resources/methods/update_resource'
581599
title: resources
582-
resource:
583-
name: resource
600+
resource_request:
601+
name: resource_request
602+
x-cfn-schema-name: ProgressEvent
603+
x-example-where-clause: WHERE region = 'us-east-1' AND data__RequestToken = '<RequestToken>'
604+
x-description: 'For more information about Amazon Web Services Cloud Control API, see the <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/what-is-cloudcontrolapi.html">Amazon Web Services Cloud Control API User Guide</a>.'
605+
x-type: native
584606
methods:
585-
get_resource:
607+
get_resource_request:
586608
operation:
587-
$ref: '#/paths/~1?Action=GetResource&Version=2021-09-30/post'
609+
$ref: '#/paths/~1?Action=GetResourceRequestStatus&Version=2021-09-30/post'
588610
request:
589611
mediaType: application/x-amz-json-1.0
590612
response:
591-
mediaType: application/json
592-
objectKey: '$.ResourceDescription'
613+
mediaType: application/x-amz-json-1.0
614+
objectKey: '$.ProgressEvent'
593615
openAPIDocKey: '200'
594-
id: aws.cloud_control.resource
616+
id: aws.cloud_control.resource_request
595617
sqlVerbs:
618+
delete: []
619+
insert: []
596620
select:
597-
- $ref: '#/components/x-stackQL-resources/resources/methods/get_resource'
598-
title: resource
621+
- $ref: '#/components/x-stackQL-resources/resource_request/methods/get_resource_request'
622+
update: []
623+
title: resource_request
599624
resource_requests:
600625
name: resource_requests
626+
x-cfn-schema-name: ResourceRequestStatusSummaries
627+
x-example-where-clause: WHERE region = 'us-east-1' AND data__ResourceRequestStatusFilter = '<ResourceRequestStatusFilter>'
628+
x-description: 'For more information about Amazon Web Services Cloud Control API, see the <a href="https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/what-is-cloudcontrolapi.html">Amazon Web Services Cloud Control API User Guide</a>.'
629+
x-type: native
601630
methods:
602631
list_resource_requests:
603632
operation:
@@ -608,15 +637,6 @@ components:
608637
mediaType: application/x-amz-json-1.0
609638
objectKey: '$.ResourceRequestStatusSummaries'
610639
openAPIDocKey: '200'
611-
get_resource_request:
612-
operation:
613-
$ref: '#/paths/~1?Action=GetResourceRequestStatus&Version=2021-09-30/post'
614-
request:
615-
mediaType: application/x-amz-json-1.0
616-
response:
617-
mediaType: application/x-amz-json-1.0
618-
objectKey: '$.ProgressEvent'
619-
openAPIDocKey: '200'
620640
cancel_resource_request:
621641
operation:
622642
$ref: '#/paths/~1?Action=CancelResourceRequest&Version=2021-09-30/post'
@@ -631,7 +651,6 @@ components:
631651
- $ref: '#/components/x-stackQL-resources/resource_requests/methods/cancel_resource_request'
632652
insert: []
633653
select:
634-
- $ref: '#/components/x-stackQL-resources/resource_requests/methods/get_resource_request'
635654
- $ref: '#/components/x-stackQL-resources/resource_requests/methods/list_resource_requests'
636655
update: []
637656
title: resource_requests
@@ -713,7 +732,6 @@ components:
713732
ClientToken:
714733
type: string
715734
DesiredState:
716-
x-stackQL-stringOnly: true
717735
allOf:
718736
- $ref: '#/components/schemas/Properties'
719737
- description: <p>Structured data format representing the desired state

test/registry/src/aws/v0.1.0/services/ec2_nextgen.yaml

Lines changed: 6 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -16701,68 +16701,23 @@ components:
1670116701
JSON_EXTRACT(Properties, '$.State') as state,
1670216702
JSON_EXTRACT(Properties, '$.Affinity') as affinity,
1670316703
JSON_EXTRACT(Properties, '$.CreditSpecification') as credit_specification
16704-
FROM aws.cloud_control.resource WHERE data__TypeName = 'AWS::EC2::Instance'
16704+
FROM aws.cloud_control.resource detail WHERE data__TypeName = 'AWS::EC2::Instance'
1670516705
AND data__Identifier = '<InstanceId>'
1670616706
AND region = 'us-east-1'
1670716707
fallback:
1670816708
predicate: sqlDialect == "sqlite3"
1670916709
ddl: |-
1671016710
SELECT
16711-
detail.region,
16712-
JSON_EXTRACT(detail.Properties, '$.Tenancy') as tenancy,
16713-
JSON_EXTRACT(detail.Properties, '$.SecurityGroups') as security_groups,
16714-
JSON_EXTRACT(detail.Properties, '$.PrivateDnsName') as private_dns_name,
16715-
JSON_EXTRACT(detail.Properties, '$.PrivateIpAddress') as private_ip_address,
16716-
JSON_EXTRACT(detail.Properties, '$.UserData') as user_data,
16717-
JSON_EXTRACT(detail.Properties, '$.BlockDeviceMappings') as block_device_mappings,
16718-
JSON_EXTRACT(detail.Properties, '$.IamInstanceProfile') as iam_instance_profile,
16719-
JSON_EXTRACT(detail.Properties, '$.Ipv6Addresses') as ipv6_addresses,
16720-
JSON_EXTRACT(detail.Properties, '$.KernelId') as kernel_id,
16721-
JSON_EXTRACT(detail.Properties, '$.SubnetId') as subnet_id,
16722-
JSON_EXTRACT(detail.Properties, '$.EbsOptimized') as ebs_optimized,
16723-
JSON_EXTRACT(detail.Properties, '$.PropagateTagsToVolumeOnCreation') as propagate_tags_to_volume_on_creation,
16724-
JSON_EXTRACT(detail.Properties, '$.ElasticGpuSpecifications') as elastic_gpu_specifications,
16725-
JSON_EXTRACT(detail.Properties, '$.ElasticInferenceAccelerators') as elastic_inference_accelerators,
16726-
JSON_EXTRACT(detail.Properties, '$.Volumes') as volumes,
16727-
JSON_EXTRACT(detail.Properties, '$.PrivateIp') as private_ip,
16728-
JSON_EXTRACT(detail.Properties, '$.Ipv6AddressCount') as ipv6_address_count,
16729-
JSON_EXTRACT(detail.Properties, '$.LaunchTemplate') as launch_template,
16730-
JSON_EXTRACT(detail.Properties, '$.EnclaveOptions') as enclave_options,
16731-
JSON_EXTRACT(detail.Properties, '$.NetworkInterfaces') as network_interfaces,
16732-
JSON_EXTRACT(detail.Properties, '$.ImageId') as image_id,
16733-
JSON_EXTRACT(detail.Properties, '$.InstanceType') as instance_type,
16734-
JSON_EXTRACT(detail.Properties, '$.Monitoring') as monitoring,
16735-
JSON_EXTRACT(detail.Properties, '$.Tags') as tags,
16736-
JSON_EXTRACT(detail.Properties, '$.AdditionalInfo') as additional_info,
16737-
JSON_EXTRACT(detail.Properties, '$.HibernationOptions') as hibernation_options,
16738-
JSON_EXTRACT(detail.Properties, '$.LicenseSpecifications') as license_specifications,
16739-
JSON_EXTRACT(detail.Properties, '$.InstanceId') as instance_id,
16740-
JSON_EXTRACT(detail.Properties, '$.PublicIp') as public_ip,
16741-
JSON_EXTRACT(detail.Properties, '$.InstanceInitiatedShutdownBehavior') as instance_initiated_shutdown_behavior,
16742-
JSON_EXTRACT(detail.Properties, '$.CpuOptions') as cpu_options,
16743-
JSON_EXTRACT(detail.Properties, '$.AvailabilityZone') as availability_zone,
16744-
JSON_EXTRACT(detail.Properties, '$.PrivateDnsNameOptions') as private_dns_name_options,
16745-
JSON_EXTRACT(detail.Properties, '$.HostId') as host_id,
16746-
JSON_EXTRACT(detail.Properties, '$.HostResourceGroupArn') as host_resource_group_arn,
16747-
JSON_EXTRACT(detail.Properties, '$.PublicDnsName') as public_dns_name,
16748-
JSON_EXTRACT(detail.Properties, '$.SecurityGroupIds') as security_group_ids,
16749-
JSON_EXTRACT(detail.Properties, '$.DisableApiTermination') as disable_api_termination,
16750-
JSON_EXTRACT(detail.Properties, '$.KeyName') as key_name,
16751-
JSON_EXTRACT(detail.Properties, '$.RamdiskId') as ramdisk_id,
16752-
JSON_EXTRACT(detail.Properties, '$.SourceDestCheck') as source_dest_check,
16753-
JSON_EXTRACT(detail.Properties, '$.PlacementGroupName') as placement_group_name,
16754-
JSON_EXTRACT(detail.Properties, '$.SsmAssociations') as ssm_associations,
16755-
JSON_EXTRACT(detail.Properties, '$.VpcId') as vpc_id,
16756-
JSON_EXTRACT(detail.Properties, '$.State') as state,
16757-
JSON_EXTRACT(detail.Properties, '$.Affinity') as affinity,
16758-
JSON_EXTRACT(detail.Properties, '$.CreditSpecification') as credit_specification
16711+
detail.region as region,
16712+
listing.Identifier as identifier,
16713+
JSON_EXTRACT(detail.Properties, '$.InstanceId') as instance_id
1675916714
FROM aws.cloud_control.resources listing
16760-
LEFT OUTER JOIN aws.cloud_control.resource detail
16715+
INNER JOIN aws.cloud_control.resource detail
1676116716
ON detail.data__Identifier = listing.Identifier
1676216717
AND detail.region = listing.region
1676316718
WHERE listing.data__TypeName = 'AWS::EC2::Instance'
1676416719
AND detail.data__TypeName = 'AWS::EC2::Instance'
16765-
AND listing.region = 'us-east-1'
16720+
AND listing.region IN ('us-west-1', 'ap-southeast-1')
1676616721
fallback:
1676716722
predicate: sqlDialect == "postgres" && requiredParams == [ data__Identifier ]
1676816723
ddl: |-

0 commit comments

Comments
 (0)