Skip to content

Commit

Permalink
feat(orgpolicy): update the API
Browse files Browse the repository at this point in the history
#### orgpolicy:v2

The following keys were added:
- resources.folders.resources.policies.methods.patch.parameters.updateMask.description
- resources.folders.resources.policies.methods.patch.parameters.updateMask.format
- resources.folders.resources.policies.methods.patch.parameters.updateMask.location
- resources.folders.resources.policies.methods.patch.parameters.updateMask.type
- resources.organizations.resources.policies.methods.patch.parameters.updateMask.description
- resources.organizations.resources.policies.methods.patch.parameters.updateMask.format
- resources.organizations.resources.policies.methods.patch.parameters.updateMask.location
- resources.organizations.resources.policies.methods.patch.parameters.updateMask.type
- resources.projects.resources.policies.methods.patch.parameters.updateMask.description
- resources.projects.resources.policies.methods.patch.parameters.updateMask.format
- resources.projects.resources.policies.methods.patch.parameters.updateMask.location
- resources.projects.resources.policies.methods.patch.parameters.updateMask.type
- schemas.GoogleCloudOrgpolicyV2Policy.properties.dryRunSpec.$ref
- schemas.GoogleCloudOrgpolicyV2Policy.properties.dryRunSpec.description
  • Loading branch information
yoshi-automation authored and sofisl committed Feb 2, 2023
1 parent ed2ccaa commit 02f050b
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
24 changes: 23 additions & 1 deletion discovery/orgpolicy-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@
"pattern": "^folders/[^/]+/policies/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v2/{+name}",
Expand Down Expand Up @@ -664,6 +670,12 @@
"pattern": "^organizations/[^/]+/policies/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v2/{+name}",
Expand Down Expand Up @@ -879,6 +891,12 @@
"pattern": "^projects/[^/]+/policies/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v2/{+name}",
Expand All @@ -897,7 +915,7 @@
}
}
},
"revision": "20221026",
"revision": "20230201",
"rootUrl": "https://orgpolicy.googleapis.com/",
"schemas": {
"GoogleCloudOrgpolicyV2AlternatePolicySpec": {
Expand Down Expand Up @@ -1108,6 +1126,10 @@
"$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec",
"description": "Deprecated."
},
"dryRunSpec": {
"$ref": "GoogleCloudOrgpolicyV2PolicySpec",
"description": "dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced."
},
"name": {
"description": "Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.",
"type": "string"
Expand Down
40 changes: 40 additions & 0 deletions src/apis/orgpolicy/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ export namespace orgpolicy_v2 {
* Deprecated.
*/
alternate?: Schema$GoogleCloudOrgpolicyV2AlternatePolicySpec;
/**
* dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced.
*/
dryRunSpec?: Schema$GoogleCloudOrgpolicyV2PolicySpec;
/**
* Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
*/
Expand Down Expand Up @@ -587,6 +591,7 @@ export namespace orgpolicy_v2 {
* // request body parameters
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand All @@ -597,6 +602,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -864,6 +870,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -1001,6 +1008,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -1278,12 +1286,15 @@ export namespace orgpolicy_v2 {
* const res = await orgpolicy.folders.policies.patch({
* // Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
* name: 'folders/my-folder/policies/my-policie',
* // Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand All @@ -1294,6 +1305,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -1451,6 +1463,10 @@ export namespace orgpolicy_v2 {
* Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
*/
name?: string;
/**
* Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
*/
updateMask?: string;

/**
* Request body metadata
Expand Down Expand Up @@ -2470,6 +2486,7 @@ export namespace orgpolicy_v2 {
* // request body parameters
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand All @@ -2480,6 +2497,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -2747,6 +2765,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -2884,6 +2903,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -3162,12 +3182,15 @@ export namespace orgpolicy_v2 {
* const res = await orgpolicy.organizations.policies.patch({
* // Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
* name: 'organizations/my-organization/policies/my-policie',
* // Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand All @@ -3178,6 +3201,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -3335,6 +3359,10 @@ export namespace orgpolicy_v2 {
* Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
*/
name?: string;
/**
* Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
*/
updateMask?: string;

/**
* Request body metadata
Expand Down Expand Up @@ -3560,6 +3588,7 @@ export namespace orgpolicy_v2 {
* // request body parameters
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand All @@ -3570,6 +3599,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -3837,6 +3867,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -3974,6 +4005,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -4251,12 +4283,15 @@ export namespace orgpolicy_v2 {
* const res = await orgpolicy.projects.policies.patch({
* // Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
* name: 'projects/my-project/policies/my-policie',
* // Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
* updateMask: 'placeholder-value',
*
* // Request body metadata
* requestBody: {
* // request body parameters
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand All @@ -4267,6 +4302,7 @@ export namespace orgpolicy_v2 {
* // Example response
* // {
* // "alternate": {},
* // "dryRunSpec": {},
* // "name": "my_name",
* // "spec": {}
* // }
Expand Down Expand Up @@ -4424,6 +4460,10 @@ export namespace orgpolicy_v2 {
* Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/{project_number\}/policies/{constraint_name\}` * `folders/{folder_id\}/policies/{constraint_name\}` * `organizations/{organization_id\}/policies/{constraint_name\}` For example, "projects/123/policies/compute.disableSerialPortAccess". Note: `projects/{project_id\}/policies/{constraint_name\}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.
*/
name?: string;
/**
* Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.
*/
updateMask?: string;

/**
* Request body metadata
Expand Down

0 comments on commit 02f050b

Please sign in to comment.