diff --git a/mmv1/products/apigee/api.yaml b/mmv1/products/apigee/api.yaml index 0c026655e..ec9da0bdc 100644 --- a/mmv1/products/apigee/api.yaml +++ b/mmv1/products/apigee/api.yaml @@ -1373,3 +1373,101 @@ objects: description: | Output only. Name of the API proxy. + + + + - !ruby/object:Api::Resource + name: OrganizationEnvgroupAttachment + base_url: '{{parent}}/attachments' + self_link: '{{name}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/apigee/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + EnvironmentGroupAttachment is a resource which defines an attachment of an environment to an environment group. + properties: + + - !ruby/object:Api::Type::String + name: 'createdAt' + description: | + Output only. The time at which the environment group attachment was created as milliseconds since epoch. + - !ruby/object:Api::Type::String + name: 'environment' + description: | + Required. ID of the attached environment. + - !ruby/object:Api::Type::String + name: 'environmentGroupId' + description: | + Output only. ID of the environment group. + - !ruby/object:Api::Type::String + name: 'name' + description: | + ID of the environment group attachment. + + + + + - !ruby/object:Api::Resource + name: OrganizationEnvgroupAttachment + base_url: '{{parent}}/attachments' + self_link: '{{name}}' + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + api: 'https://cloud.google.com/apigee/docs' + async: !ruby/object:Api::OpAsync + operation: !ruby/object:Api::OpAsync::Operation + path: 'name' + base_url: '{op_id}' + wait_ms: 1000 + result: !ruby/object:Api::OpAsync::Result + path: 'response' + resource_inside_response: true + status: !ruby/object:Api::OpAsync::Status + path: 'done' + complete: True + allowed: + - True + - False + error: !ruby/object:Api::OpAsync::Error + path: 'error' + message: 'message' + description: |- + EnvironmentGroupAttachment is a resource which defines an attachment of an environment to an environment group. + properties: + + - !ruby/object:Api::Type::String + name: 'createdAt' + description: | + Output only. The time at which the environment group attachment was created as milliseconds since epoch. + - !ruby/object:Api::Type::String + name: 'environment' + description: | + Required. ID of the attached environment. + - !ruby/object:Api::Type::String + name: 'environmentGroupId' + description: | + Output only. ID of the environment group. + - !ruby/object:Api::Type::String + name: 'name' + description: | + ID of the environment group attachment. + diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb new file mode 100644 index 000000000..cc52129ba --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment.erb @@ -0,0 +1,14 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> +<% organization_envgroup_attachment = grab_attributes(pwd)['organization_envgroup_attachment'] -%> +describe google_apigee_organization_envgroup_attachment(name: <%= doc_generation ? "' #{organization_envgroup_attachment['name']}'":"organization_envgroup_attachment['name']" -%>) do + it { should exist } + its('created_at') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['created_at']}'" : "organization_envgroup_attachment['created_at']" -%> } + its('environment') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['environment']}'" : "organization_envgroup_attachment['environment']" -%> } + its('environment_group_id') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['environment_group_id']}'" : "organization_envgroup_attachment['environment_group_id']" -%> } + its('name') { should cmp <%= doc_generation ? "'#{organization_envgroup_attachment['name']}'" : "organization_envgroup_attachment['name']" -%> } + +end + +describe google_apigee_organization_envgroup_attachment(name: "does_not_exit") do + it { should_not exist } +end \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb new file mode 100644 index 000000000..e93cd6671 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachment_attributes.erb @@ -0,0 +1,3 @@ +gcp_project_id = input(:gcp_project_id, value: '<%= external_attribute(pwd, 'gcp_project_id') -%>', description: 'The GCP project identifier.') + + organization_envgroup_attachment = input('organization_envgroup_attachment', value: <%= JSON.pretty_generate(grab_attributes(pwd)['organization_envgroup_attachment']) -%>, description: 'organization_envgroup_attachment description') \ No newline at end of file diff --git a/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb new file mode 100644 index 000000000..a14609955 --- /dev/null +++ b/mmv1/templates/inspec/examples/google_apigee_organization_envgroup_attachment/google_apigee_organization_envgroup_attachments.erb @@ -0,0 +1,5 @@ +<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%> + <% organization_envgroup_attachment = grab_attributes(pwd)['organization_envgroup_attachment'] -%> + describe google_apigee_organization_envgroup_attachments(parent: <%= doc_generation ? "' #{organization_envgroup_attachment['parent']}'":"organization_envgroup_attachment['parent']" -%>) do + it { should exist } + end \ No newline at end of file diff --git a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml index c734f49e5..b78a759bb 100644 --- a/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml +++ b/mmv1/templates/inspec/tests/integration/configuration/mm-attributes.yml @@ -1074,4 +1074,10 @@ organization_api: api_proxy_type : "value_apiproxytype" project_location_repository: name : "value_name" - parent : "value_parent" \ No newline at end of file + parent : "value_parent" +organization_envgroup_attachment: + name : "value_name" + parent : "value_parent" + created_at : "value_createdat" + environment : "value_environment" + environment_group_id : "value_environmentgroupid" \ No newline at end of file