Skip to content

Commit

Permalink
feat: [assuredworkloads] add apis for AssuredWorkload monitoring feat…
Browse files Browse the repository at this point in the history
…ure and to restrict allowed resources (#8497)

* feat: add apis for AssuredWorkload monitoring feature and to restrict allowed resources

AssuredWorkload monitoring is a new feature which provides apis to fetch compliance violation for AssuredWorkloads. It also provides an api to acknowledge an unresolved violation.

RestrictAllowedResources api allows restricting list of available resources in Workload environment.

Committer: @ViswasK
PiperOrigin-RevId: 477959383

Source-Link: googleapis/googleapis@0cad78c

Source-Link: https://github.com/googleapis/googleapis-gen/commit/3052e0d7ac989bc571fb305894ada8525d1f248e
Copy-Tag: eyJwIjoiamF2YS1hc3N1cmVkLXdvcmtsb2Fkcy8uT3dsQm90LnlhbWwiLCJoIjoiMzA1MmUwZDdhYzk4OWJjNTcxZmIzMDU4OTRhZGE4NTI1ZDFmMjQ4ZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Oct 6, 2022
1 parent c49d967 commit 7e2cc1f
Show file tree
Hide file tree
Showing 76 changed files with 24,533 additions and 3,675 deletions.
6 changes: 3 additions & 3 deletions java-assured-workloads/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-assured-workloads</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-assured-workloads:2.2.0'
implementation 'com.google.cloud:google-cloud-assured-workloads:2.3.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-assured-workloads" % "2.2.0"
libraryDependencies += "com.google.cloud" % "google-cloud-assured-workloads" % "2.3.0"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-assured-workloads</artifactId>
<version>2.1.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-assured-workloads:current} -->
<version>2.2.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-assured-workloads:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-assured-workloads-v1beta1</artifactId>
<version>0.13.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-assured-workloads-v1beta1:current} -->
<version>0.14.2-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-assured-workloads-v1beta1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-assured-workloads-v1</artifactId>
<version>2.1.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-assured-workloads-v1:current} -->
<version>2.2.2-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-assured-workloads-v1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-assured-workloads-v1beta1</artifactId>
<version>0.13.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-assured-workloads-v1beta1:current} -->
<version>0.14.2-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-assured-workloads-v1beta1:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-assured-workloads-v1</artifactId>
<version>2.1.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-assured-workloads-v1:current} -->
<version>2.2.2-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-assured-workloads-v1:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.assuredworkloads.v1;

import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListViolationsPagedResponse;
import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListWorkloadsPagedResponse;

import com.google.api.core.ApiFunction;
Expand Down Expand Up @@ -98,6 +99,13 @@ public UnaryCallSettings<UpdateWorkloadRequest, Workload> updateWorkloadSettings
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).updateWorkloadSettings();
}

/** Returns the object with the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings())
.restrictAllowedResourcesSettings();
}

/** Returns the object with the settings used for calls to deleteWorkload. */
public UnaryCallSettings<DeleteWorkloadRequest, Empty> deleteWorkloadSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).deleteWorkloadSettings();
Expand All @@ -114,6 +122,24 @@ public UnaryCallSettings<GetWorkloadRequest, Workload> getWorkloadSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).listWorkloadsSettings();
}

/** Returns the object with the settings used for calls to listViolations. */
public PagedCallSettings<
ListViolationsRequest, ListViolationsResponse, ListViolationsPagedResponse>
listViolationsSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).listViolationsSettings();
}

/** Returns the object with the settings used for calls to getViolation. */
public UnaryCallSettings<GetViolationRequest, Violation> getViolationSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).getViolationSettings();
}

/** Returns the object with the settings used for calls to acknowledgeViolation. */
public UnaryCallSettings<AcknowledgeViolationRequest, AcknowledgeViolationResponse>
acknowledgeViolationSettings() {
return ((AssuredWorkloadsServiceStubSettings) getStubSettings()).acknowledgeViolationSettings();
}

public static final AssuredWorkloadsServiceSettings create(
AssuredWorkloadsServiceStubSettings stub) throws IOException {
return new AssuredWorkloadsServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -247,6 +273,13 @@ public UnaryCallSettings.Builder<UpdateWorkloadRequest, Workload> updateWorkload
return getStubSettingsBuilder().updateWorkloadSettings();
}

/** Returns the builder for the settings used for calls to restrictAllowedResources. */
public UnaryCallSettings.Builder<
RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesSettings() {
return getStubSettingsBuilder().restrictAllowedResourcesSettings();
}

/** Returns the builder for the settings used for calls to deleteWorkload. */
public UnaryCallSettings.Builder<DeleteWorkloadRequest, Empty> deleteWorkloadSettings() {
return getStubSettingsBuilder().deleteWorkloadSettings();
Expand All @@ -264,6 +297,24 @@ public UnaryCallSettings.Builder<GetWorkloadRequest, Workload> getWorkloadSettin
return getStubSettingsBuilder().listWorkloadsSettings();
}

/** Returns the builder for the settings used for calls to listViolations. */
public PagedCallSettings.Builder<
ListViolationsRequest, ListViolationsResponse, ListViolationsPagedResponse>
listViolationsSettings() {
return getStubSettingsBuilder().listViolationsSettings();
}

/** Returns the builder for the settings used for calls to getViolation. */
public UnaryCallSettings.Builder<GetViolationRequest, Violation> getViolationSettings() {
return getStubSettingsBuilder().getViolationSettings();
}

/** Returns the builder for the settings used for calls to acknowledgeViolation. */
public UnaryCallSettings.Builder<AcknowledgeViolationRequest, AcknowledgeViolationResponse>
acknowledgeViolationSettings() {
return getStubSettingsBuilder().acknowledgeViolationSettings();
}

@Override
public AssuredWorkloadsServiceSettings build() throws IOException {
return new AssuredWorkloadsServiceSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@
"grpc": {
"libraryClient": "AssuredWorkloadsServiceClient",
"rpcs": {
"AcknowledgeViolation": {
"methods": ["acknowledgeViolation", "acknowledgeViolationCallable"]
},
"CreateWorkload": {
"methods": ["createWorkloadAsync", "createWorkloadAsync", "createWorkloadAsync", "createWorkloadOperationCallable", "createWorkloadCallable"]
},
"DeleteWorkload": {
"methods": ["deleteWorkload", "deleteWorkload", "deleteWorkload", "deleteWorkloadCallable"]
},
"GetViolation": {
"methods": ["getViolation", "getViolation", "getViolation", "getViolationCallable"]
},
"GetWorkload": {
"methods": ["getWorkload", "getWorkload", "getWorkload", "getWorkloadCallable"]
},
"ListViolations": {
"methods": ["listViolations", "listViolations", "listViolations", "listViolationsPagedCallable", "listViolationsCallable"]
},
"ListWorkloads": {
"methods": ["listWorkloads", "listWorkloads", "listWorkloads", "listWorkloadsPagedCallable", "listWorkloadsCallable"]
},
"RestrictAllowedResources": {
"methods": ["restrictAllowedResources", "restrictAllowedResourcesCallable"]
},
"UpdateWorkload": {
"methods": ["updateWorkload", "updateWorkload", "updateWorkloadCallable"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@

package com.google.cloud.assuredworkloads.v1.stub;

import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListViolationsPagedResponse;
import static com.google.cloud.assuredworkloads.v1.AssuredWorkloadsServiceClient.ListWorkloadsPagedResponse;

import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.assuredworkloads.v1.AcknowledgeViolationRequest;
import com.google.cloud.assuredworkloads.v1.AcknowledgeViolationResponse;
import com.google.cloud.assuredworkloads.v1.CreateWorkloadOperationMetadata;
import com.google.cloud.assuredworkloads.v1.CreateWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.DeleteWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.GetViolationRequest;
import com.google.cloud.assuredworkloads.v1.GetWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.ListViolationsRequest;
import com.google.cloud.assuredworkloads.v1.ListViolationsResponse;
import com.google.cloud.assuredworkloads.v1.ListWorkloadsRequest;
import com.google.cloud.assuredworkloads.v1.ListWorkloadsResponse;
import com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest;
import com.google.cloud.assuredworkloads.v1.RestrictAllowedResourcesResponse;
import com.google.cloud.assuredworkloads.v1.UpdateWorkloadRequest;
import com.google.cloud.assuredworkloads.v1.Violation;
import com.google.cloud.assuredworkloads.v1.Workload;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.OperationsStub;
Expand Down Expand Up @@ -64,6 +73,11 @@ public UnaryCallable<UpdateWorkloadRequest, Workload> updateWorkloadCallable() {
throw new UnsupportedOperationException("Not implemented: updateWorkloadCallable()");
}

public UnaryCallable<RestrictAllowedResourcesRequest, RestrictAllowedResourcesResponse>
restrictAllowedResourcesCallable() {
throw new UnsupportedOperationException("Not implemented: restrictAllowedResourcesCallable()");
}

public UnaryCallable<DeleteWorkloadRequest, Empty> deleteWorkloadCallable() {
throw new UnsupportedOperationException("Not implemented: deleteWorkloadCallable()");
}
Expand All @@ -81,6 +95,24 @@ public UnaryCallable<ListWorkloadsRequest, ListWorkloadsResponse> listWorkloadsC
throw new UnsupportedOperationException("Not implemented: listWorkloadsCallable()");
}

public UnaryCallable<ListViolationsRequest, ListViolationsPagedResponse>
listViolationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listViolationsPagedCallable()");
}

public UnaryCallable<ListViolationsRequest, ListViolationsResponse> listViolationsCallable() {
throw new UnsupportedOperationException("Not implemented: listViolationsCallable()");
}

public UnaryCallable<GetViolationRequest, Violation> getViolationCallable() {
throw new UnsupportedOperationException("Not implemented: getViolationCallable()");
}

public UnaryCallable<AcknowledgeViolationRequest, AcknowledgeViolationResponse>
acknowledgeViolationCallable() {
throw new UnsupportedOperationException("Not implemented: acknowledgeViolationCallable()");
}

@Override
public abstract void close();
}
Loading

0 comments on commit 7e2cc1f

Please sign in to comment.