Skip to content

Commit

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

The following keys were added:
- schemas.AuditLog.properties.policyViolationInfo.$ref
- schemas.AuditLog.properties.policyViolationInfo.description
- schemas.OrgPolicyViolationInfo.description
- schemas.OrgPolicyViolationInfo.id
- schemas.OrgPolicyViolationInfo.properties.payload.additionalProperties.description
- schemas.OrgPolicyViolationInfo.properties.payload.additionalProperties.type
- schemas.OrgPolicyViolationInfo.properties.payload.description
- schemas.OrgPolicyViolationInfo.properties.payload.type
- schemas.OrgPolicyViolationInfo.properties.resourceTags.additionalProperties.type
- schemas.OrgPolicyViolationInfo.properties.resourceTags.description
- schemas.OrgPolicyViolationInfo.properties.resourceTags.type
- schemas.OrgPolicyViolationInfo.properties.resourceType.description
- schemas.OrgPolicyViolationInfo.properties.resourceType.type
- schemas.OrgPolicyViolationInfo.properties.violationInfo.description
- schemas.OrgPolicyViolationInfo.properties.violationInfo.items.$ref
- schemas.OrgPolicyViolationInfo.properties.violationInfo.type
- schemas.OrgPolicyViolationInfo.type
- schemas.PolicyViolationInfo.description
- schemas.PolicyViolationInfo.id
- schemas.PolicyViolationInfo.properties.orgPolicyViolationInfo.$ref
- schemas.PolicyViolationInfo.properties.orgPolicyViolationInfo.description
- schemas.PolicyViolationInfo.type
- schemas.ViolationInfo.description
- schemas.ViolationInfo.id
- schemas.ViolationInfo.properties.checkedValue.description
- schemas.ViolationInfo.properties.checkedValue.type
- schemas.ViolationInfo.properties.constraint.description
- schemas.ViolationInfo.properties.constraint.type
- schemas.ViolationInfo.properties.errorMessage.description
- schemas.ViolationInfo.properties.errorMessage.type
- schemas.ViolationInfo.properties.policyType.description
- schemas.ViolationInfo.properties.policyType.enum
- schemas.ViolationInfo.properties.policyType.enumDescriptions
- schemas.ViolationInfo.properties.policyType.type
- schemas.ViolationInfo.type

#### servicecontrol:v2

The following keys were added:
- schemas.AuditLog.properties.policyViolationInfo.$ref
- schemas.AuditLog.properties.policyViolationInfo.description
- schemas.OrgPolicyViolationInfo.description
- schemas.OrgPolicyViolationInfo.id
- schemas.OrgPolicyViolationInfo.properties.payload.additionalProperties.description
- schemas.OrgPolicyViolationInfo.properties.payload.additionalProperties.type
- schemas.OrgPolicyViolationInfo.properties.payload.description
- schemas.OrgPolicyViolationInfo.properties.payload.type
- schemas.OrgPolicyViolationInfo.properties.resourceTags.additionalProperties.type
- schemas.OrgPolicyViolationInfo.properties.resourceTags.description
- schemas.OrgPolicyViolationInfo.properties.resourceTags.type
- schemas.OrgPolicyViolationInfo.properties.resourceType.description
- schemas.OrgPolicyViolationInfo.properties.resourceType.type
- schemas.OrgPolicyViolationInfo.properties.violationInfo.description
- schemas.OrgPolicyViolationInfo.properties.violationInfo.items.$ref
- schemas.OrgPolicyViolationInfo.properties.violationInfo.type
- schemas.OrgPolicyViolationInfo.type
- schemas.PolicyViolationInfo.description
- schemas.PolicyViolationInfo.id
- schemas.PolicyViolationInfo.properties.orgPolicyViolationInfo.$ref
- schemas.PolicyViolationInfo.properties.orgPolicyViolationInfo.description
- schemas.PolicyViolationInfo.type
- schemas.ViolationInfo.description
- schemas.ViolationInfo.id
- schemas.ViolationInfo.properties.checkedValue.description
- schemas.ViolationInfo.properties.checkedValue.type
- schemas.ViolationInfo.properties.constraint.description
- schemas.ViolationInfo.properties.constraint.type
- schemas.ViolationInfo.properties.errorMessage.description
- schemas.ViolationInfo.properties.errorMessage.type
- schemas.ViolationInfo.properties.policyType.description
- schemas.ViolationInfo.properties.policyType.enum
- schemas.ViolationInfo.properties.policyType.enumDescriptions
- schemas.ViolationInfo.properties.policyType.type
- schemas.ViolationInfo.type

The following keys were changed:
- schemas.CheckResponse.properties.status.description
  • Loading branch information
yoshi-automation authored and sofisl committed Apr 1, 2022
1 parent dadf716 commit 9b34122
Show file tree
Hide file tree
Showing 4 changed files with 280 additions and 4 deletions.
85 changes: 84 additions & 1 deletion discovery/servicecontrol-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
}
}
},
"revision": "20220227",
"revision": "20220318",
"rootUrl": "https://servicecontrol.googleapis.com/",
"schemas": {
"AllocateInfo": {
Expand Down Expand Up @@ -332,6 +332,10 @@
"format": "int64",
"type": "string"
},
"policyViolationInfo": {
"$ref": "PolicyViolationInfo",
"description": "Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here."
},
"request": {
"additionalProperties": {
"description": "Properties of the object.",
Expand Down Expand Up @@ -1252,6 +1256,39 @@
},
"type": "object"
},
"OrgPolicyViolationInfo": {
"description": "Represents OrgPolicy Violation information.",
"id": "OrgPolicyViolationInfo",
"properties": {
"payload": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.",
"type": "object"
},
"resourceTags": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.",
"type": "object"
},
"resourceType": {
"description": "Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket",
"type": "string"
},
"violationInfo": {
"description": "Optional. Policy violations",
"items": {
"$ref": "ViolationInfo"
},
"type": "array"
}
},
"type": "object"
},
"Peer": {
"description": "This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.",
"id": "Peer",
Expand Down Expand Up @@ -1283,6 +1320,17 @@
},
"type": "object"
},
"PolicyViolationInfo": {
"description": "Information related to policy violations for this request.",
"id": "PolicyViolationInfo",
"properties": {
"orgPolicyViolationInfo": {
"$ref": "OrgPolicyViolationInfo",
"description": "Indicates the orgpolicy violations for this resource."
}
},
"type": "object"
},
"QuotaError": {
"description": "Represents error information for QuotaOperation.",
"id": "QuotaError",
Expand Down Expand Up @@ -2057,6 +2105,41 @@
}
},
"type": "object"
},
"ViolationInfo": {
"description": "Provides information about the Policy violation info for this request.",
"id": "ViolationInfo",
"properties": {
"checkedValue": {
"description": "Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types",
"type": "string"
},
"constraint": {
"description": "Optional. Constraint name",
"type": "string"
},
"errorMessage": {
"description": "Optional. Error message that policy is indicating.",
"type": "string"
},
"policyType": {
"description": "Optional. Indicates the type of the policy.",
"enum": [
"POLICY_TYPE_UNSPECIFIED",
"BOOLEAN_CONSTRAINT",
"LIST_CONSTRAINT",
"CUSTOM_CONSTRAINT"
],
"enumDescriptions": [
"Default value. This value should not be used.",
"Indicates boolean policy constraint",
"Indicates list policy constraint",
"Indicates custom policy constraint"
],
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "",
Expand Down
87 changes: 85 additions & 2 deletions discovery/servicecontrol-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
}
}
},
"revision": "20220227",
"revision": "20220318",
"rootUrl": "https://servicecontrol.googleapis.com/",
"schemas": {
"Api": {
Expand Down Expand Up @@ -273,6 +273,10 @@
"format": "int64",
"type": "string"
},
"policyViolationInfo": {
"$ref": "PolicyViolationInfo",
"description": "Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here."
},
"request": {
"additionalProperties": {
"description": "Properties of the object.",
Expand Down Expand Up @@ -465,7 +469,7 @@
},
"status": {
"$ref": "Status",
"description": "Operation is allowed when this field is not set. Any non-'OK' status indicates a denial; [google.rpc.Status.details]() would contain additional details about the denial."
"description": "Operation is allowed when this field is not set. Any non-'OK' status indicates a denial; google.rpc.Status.details would contain additional details about the denial."
}
},
"type": "object"
Expand All @@ -489,6 +493,39 @@
},
"type": "object"
},
"OrgPolicyViolationInfo": {
"description": "Represents OrgPolicy Violation information.",
"id": "OrgPolicyViolationInfo",
"properties": {
"payload": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.",
"type": "object"
},
"resourceTags": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.",
"type": "object"
},
"resourceType": {
"description": "Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket",
"type": "string"
},
"violationInfo": {
"description": "Optional. Policy violations",
"items": {
"$ref": "ViolationInfo"
},
"type": "array"
}
},
"type": "object"
},
"Peer": {
"description": "This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.",
"id": "Peer",
Expand Down Expand Up @@ -520,6 +557,17 @@
},
"type": "object"
},
"PolicyViolationInfo": {
"description": "Information related to policy violations for this request.",
"id": "PolicyViolationInfo",
"properties": {
"orgPolicyViolationInfo": {
"$ref": "OrgPolicyViolationInfo",
"description": "Indicates the orgpolicy violations for this resource."
}
},
"type": "object"
},
"ReportRequest": {
"description": "Request message for the Report method.",
"id": "ReportRequest",
Expand Down Expand Up @@ -1059,6 +1107,41 @@
}
},
"type": "object"
},
"ViolationInfo": {
"description": "Provides information about the Policy violation info for this request.",
"id": "ViolationInfo",
"properties": {
"checkedValue": {
"description": "Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types",
"type": "string"
},
"constraint": {
"description": "Optional. Constraint name",
"type": "string"
},
"errorMessage": {
"description": "Optional. Error message that policy is indicating.",
"type": "string"
},
"policyType": {
"description": "Optional. Indicates the type of the policy.",
"enum": [
"POLICY_TYPE_UNSPECIFIED",
"BOOLEAN_CONSTRAINT",
"LIST_CONSTRAINT",
"CUSTOM_CONSTRAINT"
],
"enumDescriptions": [
"Default value. This value should not be used.",
"Indicates boolean policy constraint",
"Indicates list policy constraint",
"Indicates custom policy constraint"
],
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "",
Expand Down
55 changes: 55 additions & 0 deletions src/apis/servicecontrol/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ export namespace servicecontrol_v1 {
* The number of items returned from a List or Query API method, if applicable.
*/
numResponseItems?: string | null;
/**
* Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here.
*/
policyViolationInfo?: Schema$PolicyViolationInfo;
/**
* The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.
*/
Expand Down Expand Up @@ -842,6 +846,27 @@ export namespace servicecontrol_v1 {
*/
userLabels?: {[key: string]: string} | null;
}
/**
* Represents OrgPolicy Violation information.
*/
export interface Schema$OrgPolicyViolationInfo {
/**
* Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.
*/
payload?: {[key: string]: any} | null;
/**
* Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.
*/
resourceTags?: {[key: string]: string} | null;
/**
* Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket
*/
resourceType?: string | null;
/**
* Optional. Policy violations
*/
violationInfo?: Schema$ViolationInfo[];
}
/**
* This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.
*/
Expand All @@ -867,6 +892,15 @@ export namespace servicecontrol_v1 {
*/
regionCode?: string | null;
}
/**
* Information related to policy violations for this request.
*/
export interface Schema$PolicyViolationInfo {
/**
* Indicates the orgpolicy violations for this resource.
*/
orgPolicyViolationInfo?: Schema$OrgPolicyViolationInfo;
}
/**
* Represents error information for QuotaOperation.
*/
Expand Down Expand Up @@ -1421,6 +1455,27 @@ export namespace servicecontrol_v1 {
*/
line?: string | null;
}
/**
* Provides information about the Policy violation info for this request.
*/
export interface Schema$ViolationInfo {
/**
* Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types
*/
checkedValue?: string | null;
/**
* Optional. Constraint name
*/
constraint?: string | null;
/**
* Optional. Error message that policy is indicating.
*/
errorMessage?: string | null;
/**
* Optional. Indicates the type of the policy.
*/
policyType?: string | null;
}

export class Resource$Services {
context: APIRequestContext;
Expand Down
Loading

0 comments on commit 9b34122

Please sign in to comment.