| GitHub Repository | Product Reference |
Service Description: SecurityProfileGroup is a resource that defines an action for specific threat signatures or severity levels.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfileGroupName name =
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]");
SecurityProfileGroup response =
securityProfileGroupServiceClient.getSecurityProfileGroup(name);
}
Note: close() needs to be called on the SecurityProfileGroupServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
ListSecurityProfileGroups |
Lists SecurityProfileGroups in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSecurityProfileGroup |
Gets details of a single SecurityProfileGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateSecurityProfileGroup |
Creates a new SecurityProfileGroup in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSecurityProfileGroup |
Updates the parameters of a single SecurityProfileGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSecurityProfileGroup |
Deletes a single SecurityProfileGroup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSecurityProfiles |
Lists SecurityProfiles in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSecurityProfile |
Gets details of a single SecurityProfile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateSecurityProfile |
Creates a new SecurityProfile in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSecurityProfile |
Updates the parameters of a single SecurityProfile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSecurityProfile |
Deletes a single SecurityProfile. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: ***Global locations**: If For gRPC and client library implementations, the resource name ispassed as the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SecurityProfileGroupServiceSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SecurityProfileGroupServiceSettings securityProfileGroupServiceSettings =
SecurityProfileGroupServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create(securityProfileGroupServiceSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
SecurityProfileGroupServiceSettings securityProfileGroupServiceSettings =
SecurityProfileGroupServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create(securityProfileGroupServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final SecurityProfileGroupServiceClient create()Constructs an instance of SecurityProfileGroupServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(SecurityProfileGroupServiceSettings settings)
public static final SecurityProfileGroupServiceClient create(SecurityProfileGroupServiceSettings settings)Constructs an instance of SecurityProfileGroupServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
SecurityProfileGroupServiceSettings |
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(SecurityProfileGroupServiceStub stub)
public static final SecurityProfileGroupServiceClient create(SecurityProfileGroupServiceStub stub)Constructs an instance of SecurityProfileGroupServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecurityProfileGroupServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
SecurityProfileGroupServiceStub |
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient |
|
Constructors
SecurityProfileGroupServiceClient(SecurityProfileGroupServiceSettings settings)
protected SecurityProfileGroupServiceClient(SecurityProfileGroupServiceSettings settings)Constructs an instance of SecurityProfileGroupServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
SecurityProfileGroupServiceSettings |
SecurityProfileGroupServiceClient(SecurityProfileGroupServiceStub stub)
protected SecurityProfileGroupServiceClient(SecurityProfileGroupServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
SecurityProfileGroupServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
public final void close()createSecurityProfileAsync(CreateSecurityProfileRequest request)
public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(CreateSecurityProfileRequest request)Creates a new SecurityProfile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
CreateSecurityProfileRequest request =
CreateSecurityProfileRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setSecurityProfileId("securityProfileId-1121673916")
.setSecurityProfile(SecurityProfile.newBuilder().build())
.build();
SecurityProfile response =
securityProfileGroupServiceClient.createSecurityProfileAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateSecurityProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfile,OperationMetadata> |
|
createSecurityProfileAsync(LocationName parent, SecurityProfile securityProfile, String securityProfileId)
public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(LocationName parent, SecurityProfile securityProfile, String securityProfileId)Creates a new SecurityProfile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
String securityProfileId = "securityProfileId-1121673916";
SecurityProfile response =
securityProfileGroupServiceClient
.createSecurityProfileAsync(parent, securityProfile, securityProfileId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the SecurityProfile. Must be in the format
|
securityProfile |
SecurityProfileRequired. SecurityProfile resource to be created. |
securityProfileId |
StringRequired. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfile,OperationMetadata> |
|
createSecurityProfileAsync(OrganizationLocationName parent, SecurityProfile securityProfile, String securityProfileId)
public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(OrganizationLocationName parent, SecurityProfile securityProfile, String securityProfileId)Creates a new SecurityProfile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
String securityProfileId = "securityProfileId-1121673916";
SecurityProfile response =
securityProfileGroupServiceClient
.createSecurityProfileAsync(parent, securityProfile, securityProfileId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the SecurityProfile. Must be in the format
|
securityProfile |
SecurityProfileRequired. SecurityProfile resource to be created. |
securityProfileId |
StringRequired. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfile,OperationMetadata> |
|
createSecurityProfileAsync(String parent, SecurityProfile securityProfile, String securityProfileId)
public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(String parent, SecurityProfile securityProfile, String securityProfileId)Creates a new SecurityProfile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
String securityProfileId = "securityProfileId-1121673916";
SecurityProfile response =
securityProfileGroupServiceClient
.createSecurityProfileAsync(parent, securityProfile, securityProfileId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the SecurityProfile. Must be in the format
|
securityProfile |
SecurityProfileRequired. SecurityProfile resource to be created. |
securityProfileId |
StringRequired. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfile,OperationMetadata> |
|
createSecurityProfileCallable()
public final UnaryCallable<CreateSecurityProfileRequest,Operation> createSecurityProfileCallable()Creates a new SecurityProfile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
CreateSecurityProfileRequest request =
CreateSecurityProfileRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setSecurityProfileId("securityProfileId-1121673916")
.setSecurityProfile(SecurityProfile.newBuilder().build())
.build();
ApiFuture<Operation> future =
securityProfileGroupServiceClient.createSecurityProfileCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateSecurityProfileRequest,Operation> |
|
createSecurityProfileGroupAsync(CreateSecurityProfileGroupRequest request)
public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(CreateSecurityProfileGroupRequest request)Creates a new SecurityProfileGroup in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
CreateSecurityProfileGroupRequest request =
CreateSecurityProfileGroupRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setSecurityProfileGroupId("securityProfileGroupId-357991055")
.setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
.build();
SecurityProfileGroup response =
securityProfileGroupServiceClient.createSecurityProfileGroupAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateSecurityProfileGroupRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfileGroup,OperationMetadata> |
|
createSecurityProfileGroupAsync(LocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)
public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(LocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)Creates a new SecurityProfileGroup in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
String securityProfileGroupId = "securityProfileGroupId-357991055";
SecurityProfileGroup response =
securityProfileGroupServiceClient
.createSecurityProfileGroupAsync(parent, securityProfileGroup, securityProfileGroupId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the SecurityProfileGroup. Must be in the format
|
securityProfileGroup |
SecurityProfileGroupRequired. SecurityProfileGroup resource to be created. |
securityProfileGroupId |
StringRequired. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile_group1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfileGroup,OperationMetadata> |
|
createSecurityProfileGroupAsync(OrganizationLocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)
public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(OrganizationLocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)Creates a new SecurityProfileGroup in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
String securityProfileGroupId = "securityProfileGroupId-357991055";
SecurityProfileGroup response =
securityProfileGroupServiceClient
.createSecurityProfileGroupAsync(parent, securityProfileGroup, securityProfileGroupId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the SecurityProfileGroup. Must be in the format
|
securityProfileGroup |
SecurityProfileGroupRequired. SecurityProfileGroup resource to be created. |
securityProfileGroupId |
StringRequired. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile_group1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfileGroup,OperationMetadata> |
|
createSecurityProfileGroupAsync(String parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)
public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(String parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)Creates a new SecurityProfileGroup in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
String securityProfileGroupId = "securityProfileGroupId-357991055";
SecurityProfileGroup response =
securityProfileGroupServiceClient
.createSecurityProfileGroupAsync(parent, securityProfileGroup, securityProfileGroupId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the SecurityProfileGroup. Must be in the format
|
securityProfileGroup |
SecurityProfileGroupRequired. SecurityProfileGroup resource to be created. |
securityProfileGroupId |
StringRequired. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile_group1". |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfileGroup,OperationMetadata> |
|
createSecurityProfileGroupCallable()
public final UnaryCallable<CreateSecurityProfileGroupRequest,Operation> createSecurityProfileGroupCallable()Creates a new SecurityProfileGroup in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
CreateSecurityProfileGroupRequest request =
CreateSecurityProfileGroupRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setSecurityProfileGroupId("securityProfileGroupId-357991055")
.setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
.build();
ApiFuture<Operation> future =
securityProfileGroupServiceClient
.createSecurityProfileGroupCallable()
.futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateSecurityProfileGroupRequest,Operation> |
|
createSecurityProfileGroupOperationCallable()
public final OperationCallable<CreateSecurityProfileGroupRequest,SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupOperationCallable()Creates a new SecurityProfileGroup in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
CreateSecurityProfileGroupRequest request =
CreateSecurityProfileGroupRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setSecurityProfileGroupId("securityProfileGroupId-357991055")
.setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
.build();
OperationFuture<SecurityProfileGroup, OperationMetadata> future =
securityProfileGroupServiceClient
.createSecurityProfileGroupOperationCallable()
.futureCall(request);
// Do something.
SecurityProfileGroup response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateSecurityProfileGroupRequest,SecurityProfileGroup,OperationMetadata> |
|
createSecurityProfileOperationCallable()
public final OperationCallable<CreateSecurityProfileRequest,SecurityProfile,OperationMetadata> createSecurityProfileOperationCallable()Creates a new SecurityProfile in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
CreateSecurityProfileRequest request =
CreateSecurityProfileRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setSecurityProfileId("securityProfileId-1121673916")
.setSecurityProfile(SecurityProfile.newBuilder().build())
.build();
OperationFuture<SecurityProfile, OperationMetadata> future =
securityProfileGroupServiceClient
.createSecurityProfileOperationCallable()
.futureCall(request);
// Do something.
SecurityProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateSecurityProfileRequest,SecurityProfile,OperationMetadata> |
|
deleteSecurityProfileAsync(DeleteSecurityProfileRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteSecurityProfileAsync(DeleteSecurityProfileRequest request)Deletes a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
DeleteSecurityProfileRequest request =
DeleteSecurityProfileRequest.newBuilder()
.setName(
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString())
.setEtag("etag3123477")
.build();
securityProfileGroupServiceClient.deleteSecurityProfileAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteSecurityProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteSecurityProfileAsync(SecurityProfileName name)
public final OperationFuture<Empty,OperationMetadata> deleteSecurityProfileAsync(SecurityProfileName name)Deletes a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfileName name =
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]");
securityProfileGroupServiceClient.deleteSecurityProfileAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
SecurityProfileNameRequired. A name of the SecurityProfile to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteSecurityProfileAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteSecurityProfileAsync(String name)Deletes a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String name =
SecurityProfileName.ofOrganizationLocationSecurityProfileName(
"[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString();
securityProfileGroupServiceClient.deleteSecurityProfileAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the SecurityProfile to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteSecurityProfileCallable()
public final UnaryCallable<DeleteSecurityProfileRequest,Operation> deleteSecurityProfileCallable()Deletes a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
DeleteSecurityProfileRequest request =
DeleteSecurityProfileRequest.newBuilder()
.setName(
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
securityProfileGroupServiceClient.deleteSecurityProfileCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteSecurityProfileRequest,Operation> |
|
deleteSecurityProfileGroupAsync(DeleteSecurityProfileGroupRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteSecurityProfileGroupAsync(DeleteSecurityProfileGroupRequest request)Deletes a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
DeleteSecurityProfileGroupRequest request =
DeleteSecurityProfileGroupRequest.newBuilder()
.setName(
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString())
.setEtag("etag3123477")
.build();
securityProfileGroupServiceClient.deleteSecurityProfileGroupAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteSecurityProfileGroupRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteSecurityProfileGroupAsync(SecurityProfileGroupName name)
public final OperationFuture<Empty,OperationMetadata> deleteSecurityProfileGroupAsync(SecurityProfileGroupName name)Deletes a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfileGroupName name =
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]");
securityProfileGroupServiceClient.deleteSecurityProfileGroupAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
SecurityProfileGroupNameRequired. A name of the SecurityProfileGroup to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteSecurityProfileGroupAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteSecurityProfileGroupAsync(String name)Deletes a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String name =
SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
"[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString();
securityProfileGroupServiceClient.deleteSecurityProfileGroupAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the SecurityProfileGroup to delete. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteSecurityProfileGroupCallable()
public final UnaryCallable<DeleteSecurityProfileGroupRequest,Operation> deleteSecurityProfileGroupCallable()Deletes a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
DeleteSecurityProfileGroupRequest request =
DeleteSecurityProfileGroupRequest.newBuilder()
.setName(
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
securityProfileGroupServiceClient
.deleteSecurityProfileGroupCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteSecurityProfileGroupRequest,Operation> |
|
deleteSecurityProfileGroupOperationCallable()
public final OperationCallable<DeleteSecurityProfileGroupRequest,Empty,OperationMetadata> deleteSecurityProfileGroupOperationCallable()Deletes a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
DeleteSecurityProfileGroupRequest request =
DeleteSecurityProfileGroupRequest.newBuilder()
.setName(
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
securityProfileGroupServiceClient
.deleteSecurityProfileGroupOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteSecurityProfileGroupRequest,Empty,OperationMetadata> |
|
deleteSecurityProfileOperationCallable()
public final OperationCallable<DeleteSecurityProfileRequest,Empty,OperationMetadata> deleteSecurityProfileOperationCallable()Deletes a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
DeleteSecurityProfileRequest request =
DeleteSecurityProfileRequest.newBuilder()
.setName(
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
securityProfileGroupServiceClient
.deleteSecurityProfileOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteSecurityProfileRequest,Empty,OperationMetadata> |
|
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = securityProfileGroupServiceClient.getIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future =
securityProfileGroupServiceClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
|
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = securityProfileGroupServiceClient.getLocation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
securityProfileGroupServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getOperationsClient()
public final OperationsClient getOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getSecurityProfile(GetSecurityProfileRequest request)
public final SecurityProfile getSecurityProfile(GetSecurityProfileRequest request)Gets details of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetSecurityProfileRequest request =
GetSecurityProfileRequest.newBuilder()
.setName(
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString())
.build();
SecurityProfile response = securityProfileGroupServiceClient.getSecurityProfile(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetSecurityProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SecurityProfile |
|
getSecurityProfile(SecurityProfileName name)
public final SecurityProfile getSecurityProfile(SecurityProfileName name)Gets details of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfileName name =
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]");
SecurityProfile response = securityProfileGroupServiceClient.getSecurityProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
SecurityProfileNameRequired. A name of the SecurityProfile to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfile |
|
getSecurityProfile(String name)
public final SecurityProfile getSecurityProfile(String name)Gets details of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String name =
SecurityProfileName.ofOrganizationLocationSecurityProfileName(
"[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString();
SecurityProfile response = securityProfileGroupServiceClient.getSecurityProfile(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the SecurityProfile to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfile |
|
getSecurityProfileCallable()
public final UnaryCallable<GetSecurityProfileRequest,SecurityProfile> getSecurityProfileCallable()Gets details of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetSecurityProfileRequest request =
GetSecurityProfileRequest.newBuilder()
.setName(
SecurityProfileName.ofProjectLocationSecurityProfileName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE]")
.toString())
.build();
ApiFuture<SecurityProfile> future =
securityProfileGroupServiceClient.getSecurityProfileCallable().futureCall(request);
// Do something.
SecurityProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetSecurityProfileRequest,SecurityProfile> |
|
getSecurityProfileGroup(GetSecurityProfileGroupRequest request)
public final SecurityProfileGroup getSecurityProfileGroup(GetSecurityProfileGroupRequest request)Gets details of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetSecurityProfileGroupRequest request =
GetSecurityProfileGroupRequest.newBuilder()
.setName(
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString())
.build();
SecurityProfileGroup response =
securityProfileGroupServiceClient.getSecurityProfileGroup(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetSecurityProfileGroupRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroup |
|
getSecurityProfileGroup(SecurityProfileGroupName name)
public final SecurityProfileGroup getSecurityProfileGroup(SecurityProfileGroupName name)Gets details of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfileGroupName name =
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]");
SecurityProfileGroup response =
securityProfileGroupServiceClient.getSecurityProfileGroup(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
SecurityProfileGroupNameRequired. A name of the SecurityProfileGroup to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroup |
|
getSecurityProfileGroup(String name)
public final SecurityProfileGroup getSecurityProfileGroup(String name)Gets details of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String name =
SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
"[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString();
SecurityProfileGroup response =
securityProfileGroupServiceClient.getSecurityProfileGroup(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the SecurityProfileGroup to get. Must be in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroup |
|
getSecurityProfileGroupCallable()
public final UnaryCallable<GetSecurityProfileGroupRequest,SecurityProfileGroup> getSecurityProfileGroupCallable()Gets details of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
GetSecurityProfileGroupRequest request =
GetSecurityProfileGroupRequest.newBuilder()
.setName(
SecurityProfileGroupName.ofProjectLocationSecurityProfileGroupName(
"[PROJECT]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
.toString())
.build();
ApiFuture<SecurityProfileGroup> future =
securityProfileGroupServiceClient.getSecurityProfileGroupCallable().futureCall(request);
// Do something.
SecurityProfileGroup response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetSecurityProfileGroupRequest,SecurityProfileGroup> |
|
getSettings()
public final SecurityProfileGroupServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceSettings |
|
getStub()
public SecurityProfileGroupServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listLocations(ListLocationsRequest request)
public final SecurityProfileGroupServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
***Global locations**: If name is empty, the method lists thepublic
locations available to all projects. * **Project-specificlocations**: If
name follows the formatprojects/{project}, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.
For gRPC and client library implementations, the resource name ispassed as the name field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element :
securityProfileGroupServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
***Global locations**: If name is empty, the method lists thepublic
locations available to all projects. * **Project-specificlocations**: If
name follows the formatprojects/{project}, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.
For gRPC and client library implementations, the resource name ispassed as the name field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
securityProfileGroupServiceClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,SecurityProfileGroupServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
***Global locations**: If name is empty, the method lists thepublic
locations available to all projects. * **Project-specificlocations**: If
name follows the formatprojects/{project}, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.
For gRPC and client library implementations, the resource name ispassed as the name field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
securityProfileGroupServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
listSecurityProfileGroups(ListSecurityProfileGroupsRequest request)
public final SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse listSecurityProfileGroups(ListSecurityProfileGroupsRequest request)Lists SecurityProfileGroups in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListSecurityProfileGroupsRequest request =
ListSecurityProfileGroupsRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SecurityProfileGroup element :
securityProfileGroupServiceClient.listSecurityProfileGroups(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListSecurityProfileGroupsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse |
|
listSecurityProfileGroups(LocationName parent)
public final SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse listSecurityProfileGroups(LocationName parent)Lists SecurityProfileGroups in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (SecurityProfileGroup element :
securityProfileGroupServiceClient.listSecurityProfileGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project or organization and location from which the
SecurityProfileGroups should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse |
|
listSecurityProfileGroups(OrganizationLocationName parent)
public final SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse listSecurityProfileGroups(OrganizationLocationName parent)Lists SecurityProfileGroups in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (SecurityProfileGroup element :
securityProfileGroupServiceClient.listSecurityProfileGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The project or organization and location from which the
SecurityProfileGroups should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse |
|
listSecurityProfileGroups(String parent)
public final SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse listSecurityProfileGroups(String parent)Lists SecurityProfileGroups in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
for (SecurityProfileGroup element :
securityProfileGroupServiceClient.listSecurityProfileGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project or organization and location from which the
SecurityProfileGroups should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse |
|
listSecurityProfileGroupsCallable()
public final UnaryCallable<ListSecurityProfileGroupsRequest,ListSecurityProfileGroupsResponse> listSecurityProfileGroupsCallable()Lists SecurityProfileGroups in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListSecurityProfileGroupsRequest request =
ListSecurityProfileGroupsRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSecurityProfileGroupsResponse response =
securityProfileGroupServiceClient.listSecurityProfileGroupsCallable().call(request);
for (SecurityProfileGroup element : response.getSecurityProfileGroupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSecurityProfileGroupsRequest,ListSecurityProfileGroupsResponse> |
|
listSecurityProfileGroupsPagedCallable()
public final UnaryCallable<ListSecurityProfileGroupsRequest,SecurityProfileGroupServiceClient.ListSecurityProfileGroupsPagedResponse> listSecurityProfileGroupsPagedCallable()Lists SecurityProfileGroups in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListSecurityProfileGroupsRequest request =
ListSecurityProfileGroupsRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SecurityProfileGroup> future =
securityProfileGroupServiceClient
.listSecurityProfileGroupsPagedCallable()
.futureCall(request);
// Do something.
for (SecurityProfileGroup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSecurityProfileGroupsRequest,ListSecurityProfileGroupsPagedResponse> |
|
listSecurityProfiles(ListSecurityProfilesRequest request)
public final SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse listSecurityProfiles(ListSecurityProfilesRequest request)Lists SecurityProfiles in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListSecurityProfilesRequest request =
ListSecurityProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SecurityProfile element :
securityProfileGroupServiceClient.listSecurityProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListSecurityProfilesRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse |
|
listSecurityProfiles(LocationName parent)
public final SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse listSecurityProfiles(LocationName parent)Lists SecurityProfiles in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (SecurityProfile element :
securityProfileGroupServiceClient.listSecurityProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The project or organization and location from which the
SecurityProfiles should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse |
|
listSecurityProfiles(OrganizationLocationName parent)
public final SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse listSecurityProfiles(OrganizationLocationName parent)Lists SecurityProfiles in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
for (SecurityProfile element :
securityProfileGroupServiceClient.listSecurityProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The project or organization and location from which the
SecurityProfiles should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse |
|
listSecurityProfiles(String parent)
public final SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse listSecurityProfiles(String parent)Lists SecurityProfiles in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
for (SecurityProfile element :
securityProfileGroupServiceClient.listSecurityProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project or organization and location from which the
SecurityProfiles should be listed, specified in the format
|
| Returns | |
|---|---|
| Type | Description |
SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse |
|
listSecurityProfilesCallable()
public final UnaryCallable<ListSecurityProfilesRequest,ListSecurityProfilesResponse> listSecurityProfilesCallable()Lists SecurityProfiles in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListSecurityProfilesRequest request =
ListSecurityProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSecurityProfilesResponse response =
securityProfileGroupServiceClient.listSecurityProfilesCallable().call(request);
for (SecurityProfile element : response.getSecurityProfilesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSecurityProfilesRequest,ListSecurityProfilesResponse> |
|
listSecurityProfilesPagedCallable()
public final UnaryCallable<ListSecurityProfilesRequest,SecurityProfileGroupServiceClient.ListSecurityProfilesPagedResponse> listSecurityProfilesPagedCallable()Lists SecurityProfiles in a given project and location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
ListSecurityProfilesRequest request =
ListSecurityProfilesRequest.newBuilder()
.setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SecurityProfile> future =
securityProfileGroupServiceClient.listSecurityProfilesPagedCallable().futureCall(request);
// Do something.
for (SecurityProfile element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListSecurityProfilesRequest,ListSecurityProfilesPagedResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = securityProfileGroupServiceClient.setIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future =
securityProfileGroupServiceClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response =
securityProfileGroupServiceClient.testIamPermissions(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
|
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
AddressGroupName.ofProjectLocationAddressGroupName(
"[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
.toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
securityProfileGroupServiceClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateSecurityProfileAsync(SecurityProfile securityProfile, FieldMask updateMask)
public final OperationFuture<SecurityProfile,OperationMetadata> updateSecurityProfileAsync(SecurityProfile securityProfile, FieldMask updateMask)Updates the parameters of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SecurityProfile response =
securityProfileGroupServiceClient
.updateSecurityProfileAsync(securityProfile, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
securityProfile |
SecurityProfileRequired. Updated SecurityProfile resource. |
updateMask |
FieldMaskRequired. Field mask is used to specify the fields to be overwritten in the SecurityProfile resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfile,OperationMetadata> |
|
updateSecurityProfileAsync(UpdateSecurityProfileRequest request)
public final OperationFuture<SecurityProfile,OperationMetadata> updateSecurityProfileAsync(UpdateSecurityProfileRequest request)Updates the parameters of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
UpdateSecurityProfileRequest request =
UpdateSecurityProfileRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSecurityProfile(SecurityProfile.newBuilder().build())
.build();
SecurityProfile response =
securityProfileGroupServiceClient.updateSecurityProfileAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateSecurityProfileRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfile,OperationMetadata> |
|
updateSecurityProfileCallable()
public final UnaryCallable<UpdateSecurityProfileRequest,Operation> updateSecurityProfileCallable()Updates the parameters of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
UpdateSecurityProfileRequest request =
UpdateSecurityProfileRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSecurityProfile(SecurityProfile.newBuilder().build())
.build();
ApiFuture<Operation> future =
securityProfileGroupServiceClient.updateSecurityProfileCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateSecurityProfileRequest,Operation> |
|
updateSecurityProfileGroupAsync(SecurityProfileGroup securityProfileGroup, FieldMask updateMask)
public final OperationFuture<SecurityProfileGroup,OperationMetadata> updateSecurityProfileGroupAsync(SecurityProfileGroup securityProfileGroup, FieldMask updateMask)Updates the parameters of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SecurityProfileGroup response =
securityProfileGroupServiceClient
.updateSecurityProfileGroupAsync(securityProfileGroup, updateMask)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
securityProfileGroup |
SecurityProfileGroupRequired. Updated SecurityProfileGroup resource. |
updateMask |
FieldMaskRequired. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfileGroup,OperationMetadata> |
|
updateSecurityProfileGroupAsync(UpdateSecurityProfileGroupRequest request)
public final OperationFuture<SecurityProfileGroup,OperationMetadata> updateSecurityProfileGroupAsync(UpdateSecurityProfileGroupRequest request)Updates the parameters of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
UpdateSecurityProfileGroupRequest request =
UpdateSecurityProfileGroupRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
.build();
SecurityProfileGroup response =
securityProfileGroupServiceClient.updateSecurityProfileGroupAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateSecurityProfileGroupRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<SecurityProfileGroup,OperationMetadata> |
|
updateSecurityProfileGroupCallable()
public final UnaryCallable<UpdateSecurityProfileGroupRequest,Operation> updateSecurityProfileGroupCallable()Updates the parameters of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
UpdateSecurityProfileGroupRequest request =
UpdateSecurityProfileGroupRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
.build();
ApiFuture<Operation> future =
securityProfileGroupServiceClient
.updateSecurityProfileGroupCallable()
.futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateSecurityProfileGroupRequest,Operation> |
|
updateSecurityProfileGroupOperationCallable()
public final OperationCallable<UpdateSecurityProfileGroupRequest,SecurityProfileGroup,OperationMetadata> updateSecurityProfileGroupOperationCallable()Updates the parameters of a single SecurityProfileGroup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
UpdateSecurityProfileGroupRequest request =
UpdateSecurityProfileGroupRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
.build();
OperationFuture<SecurityProfileGroup, OperationMetadata> future =
securityProfileGroupServiceClient
.updateSecurityProfileGroupOperationCallable()
.futureCall(request);
// Do something.
SecurityProfileGroup response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateSecurityProfileGroupRequest,SecurityProfileGroup,OperationMetadata> |
|
updateSecurityProfileOperationCallable()
public final OperationCallable<UpdateSecurityProfileRequest,SecurityProfile,OperationMetadata> updateSecurityProfileOperationCallable()Updates the parameters of a single SecurityProfile.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecurityProfileGroupServiceClient securityProfileGroupServiceClient =
SecurityProfileGroupServiceClient.create()) {
UpdateSecurityProfileRequest request =
UpdateSecurityProfileRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSecurityProfile(SecurityProfile.newBuilder().build())
.build();
OperationFuture<SecurityProfile, OperationMetadata> future =
securityProfileGroupServiceClient
.updateSecurityProfileOperationCallable()
.futureCall(request);
// Do something.
SecurityProfile response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateSecurityProfileRequest,SecurityProfile,OperationMetadata> |
|