- 0.58.0 (latest)
- 0.57.0
- 0.56.0
- 0.55.0
- 0.54.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.4
- 0.5.1
- 0.4.4
A client to Network Security API
The interfaces provided are listed below, along with usage samples.
NetworkSecurityClient
Service Description: Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
Sample for NetworkSecurityClient:
// 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthorizationPolicyName name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
}
Classes
AuthorizationPolicy
AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.
Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy
AuthorizationPolicy.Builder
AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.
Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy
AuthorizationPolicy.Rule
Specification of rules.
Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule
AuthorizationPolicy.Rule.Builder
Specification of rules.
Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule
AuthorizationPolicy.Rule.Destination
Specification of traffic destination attributes.
Protobuf type
google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination
AuthorizationPolicy.Rule.Destination.Builder
Specification of traffic destination attributes.
Protobuf type
google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination
AuthorizationPolicy.Rule.Destination.HttpHeaderMatch
Specification of HTTP header match attributes.
Protobuf type
google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch
AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.Builder
Specification of HTTP header match attributes.
Protobuf type
google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch
AuthorizationPolicy.Rule.Source
Specification of traffic source attributes.
Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source
AuthorizationPolicy.Rule.Source.Builder
Specification of traffic source attributes.
Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source
AuthorizationPolicyName
AuthorizationPolicyName.Builder
Builder for projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}.
AuthorizationPolicyProto
CertificateProvider
Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.
Protobuf type google.cloud.networksecurity.v1beta1.CertificateProvider
CertificateProvider.Builder
Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.
Protobuf type google.cloud.networksecurity.v1beta1.CertificateProvider
CertificateProviderInstance
Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.
Protobuf type google.cloud.networksecurity.v1beta1.CertificateProviderInstance
CertificateProviderInstance.Builder
Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.
Protobuf type google.cloud.networksecurity.v1beta1.CertificateProviderInstance
ClientTlsPolicy
ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.
Protobuf type google.cloud.networksecurity.v1beta1.ClientTlsPolicy
ClientTlsPolicy.Builder
ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.
Protobuf type google.cloud.networksecurity.v1beta1.ClientTlsPolicy
ClientTlsPolicyName
ClientTlsPolicyName.Builder
Builder for projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}.
ClientTlsPolicyProto
CommonProto
CreateAuthorizationPolicyRequest
Request used by the CreateAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest
CreateAuthorizationPolicyRequest.Builder
Request used by the CreateAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest
CreateClientTlsPolicyRequest
Request used by the CreateClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest
CreateClientTlsPolicyRequest.Builder
Request used by the CreateClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest
CreateServerTlsPolicyRequest
Request used by the CreateServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest
CreateServerTlsPolicyRequest.Builder
Request used by the CreateServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest
DeleteAuthorizationPolicyRequest
Request used by the DeleteAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest
DeleteAuthorizationPolicyRequest.Builder
Request used by the DeleteAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest
DeleteClientTlsPolicyRequest
Request used by the DeleteClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest
DeleteClientTlsPolicyRequest.Builder
Request used by the DeleteClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest
DeleteServerTlsPolicyRequest
Request used by the DeleteServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest
DeleteServerTlsPolicyRequest.Builder
Request used by the DeleteServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest
GetAuthorizationPolicyRequest
Request used by the GetAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest
GetAuthorizationPolicyRequest.Builder
Request used by the GetAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest
GetClientTlsPolicyRequest
Request used by the GetClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest
GetClientTlsPolicyRequest.Builder
Request used by the GetClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest
GetServerTlsPolicyRequest
Request used by the GetServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest
GetServerTlsPolicyRequest.Builder
Request used by the GetServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest
GrpcEndpoint
Specification of the GRPC Endpoint.
Protobuf type google.cloud.networksecurity.v1beta1.GrpcEndpoint
GrpcEndpoint.Builder
Specification of the GRPC Endpoint.
Protobuf type google.cloud.networksecurity.v1beta1.GrpcEndpoint
ListAuthorizationPoliciesRequest
Request used with the ListAuthorizationPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest
ListAuthorizationPoliciesRequest.Builder
Request used with the ListAuthorizationPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest
ListAuthorizationPoliciesResponse
Response returned by the ListAuthorizationPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse
ListAuthorizationPoliciesResponse.Builder
Response returned by the ListAuthorizationPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse
ListClientTlsPoliciesRequest
Request used by the ListClientTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest
ListClientTlsPoliciesRequest.Builder
Request used by the ListClientTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest
ListClientTlsPoliciesResponse
Response returned by the ListClientTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse
ListClientTlsPoliciesResponse.Builder
Response returned by the ListClientTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse
ListServerTlsPoliciesRequest
Request used by the ListServerTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest
ListServerTlsPoliciesRequest.Builder
Request used by the ListServerTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest
ListServerTlsPoliciesResponse
Response returned by the ListServerTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse
ListServerTlsPoliciesResponse.Builder
Response returned by the ListServerTlsPolicies method.
Protobuf type google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse
LocationName
LocationName.Builder
Builder for projects/{project}/locations/{location}.
NetworkSecurityClient
Service Description: Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
AuthorizationPolicyName name =
AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
}
Note: close() needs to be called on the NetworkSecurityClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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 NetworkSecuritySettings 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
NetworkSecuritySettings networkSecuritySettings =
NetworkSecuritySettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
NetworkSecurityClient networkSecurityClient =
NetworkSecurityClient.create(networkSecuritySettings);
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
NetworkSecuritySettings networkSecuritySettings =
NetworkSecuritySettings.newBuilder().setEndpoint(myEndpoint).build();
NetworkSecurityClient networkSecurityClient =
NetworkSecurityClient.create(networkSecuritySettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// 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
NetworkSecuritySettings networkSecuritySettings =
NetworkSecuritySettings.newBuilder()
.setTransportChannelProvider(
NetworkSecuritySettings.defaultHttpJsonTransportProviderBuilder().build())
.build();
NetworkSecurityClient networkSecurityClient =
NetworkSecurityClient.create(networkSecuritySettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
NetworkSecurityClient.ListAuthorizationPoliciesFixedSizeCollection
NetworkSecurityClient.ListAuthorizationPoliciesPage
NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse
NetworkSecurityClient.ListClientTlsPoliciesFixedSizeCollection
NetworkSecurityClient.ListClientTlsPoliciesPage
NetworkSecurityClient.ListClientTlsPoliciesPagedResponse
NetworkSecurityClient.ListLocationsFixedSizeCollection
NetworkSecurityClient.ListLocationsPage
NetworkSecurityClient.ListLocationsPagedResponse
NetworkSecurityClient.ListServerTlsPoliciesFixedSizeCollection
NetworkSecurityClient.ListServerTlsPoliciesPage
NetworkSecurityClient.ListServerTlsPoliciesPagedResponse
NetworkSecurityGrpc
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
NetworkSecurityGrpc.NetworkSecurityBlockingStub
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
NetworkSecurityGrpc.NetworkSecurityFutureStub
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
NetworkSecurityGrpc.NetworkSecurityImplBase
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
NetworkSecurityGrpc.NetworkSecurityStub
Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.
NetworkSecurityOuterClass
NetworkSecuritySettings
Settings class to configure an instance of NetworkSecurityClient.
The default instance has everything set to sensible defaults:
- The default service address (networksecurity.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of getAuthorizationPolicy to 30 seconds:
// 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
NetworkSecuritySettings.Builder networkSecuritySettingsBuilder =
NetworkSecuritySettings.newBuilder();
networkSecuritySettingsBuilder
.getAuthorizationPolicySettings()
.setRetrySettings(
networkSecuritySettingsBuilder
.getAuthorizationPolicySettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
NetworkSecuritySettings networkSecuritySettings = networkSecuritySettingsBuilder.build();
NetworkSecuritySettings.Builder
Builder for NetworkSecuritySettings.
OperationMetadata
Represents the metadata of the long-running operation.
Protobuf type google.cloud.networksecurity.v1beta1.OperationMetadata
OperationMetadata.Builder
Represents the metadata of the long-running operation.
Protobuf type google.cloud.networksecurity.v1beta1.OperationMetadata
ServerTlsPolicy
ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target https proxy or endpoint config selector resource.
Protobuf type google.cloud.networksecurity.v1beta1.ServerTlsPolicy
ServerTlsPolicy.Builder
ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target https proxy or endpoint config selector resource.
Protobuf type google.cloud.networksecurity.v1beta1.ServerTlsPolicy
ServerTlsPolicy.MTLSPolicy
Specification of the MTLSPolicy.
Protobuf type google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy
ServerTlsPolicy.MTLSPolicy.Builder
Specification of the MTLSPolicy.
Protobuf type google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy
ServerTlsPolicyName
ServerTlsPolicyName.Builder
Builder for projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}.
ServerTlsPolicyProto
TlsProto
UpdateAuthorizationPolicyRequest
Request used by the UpdateAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest
UpdateAuthorizationPolicyRequest.Builder
Request used by the UpdateAuthorizationPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest
UpdateClientTlsPolicyRequest
Request used by UpdateClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest
UpdateClientTlsPolicyRequest.Builder
Request used by UpdateClientTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest
UpdateServerTlsPolicyRequest
Request used by UpdateServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest
UpdateServerTlsPolicyRequest.Builder
Request used by UpdateServerTlsPolicy method.
Protobuf type google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest
ValidationCA
Specification of ValidationCA. Defines the mechanism to obtain the Certificate Authority certificate to validate the peer certificate.
Protobuf type google.cloud.networksecurity.v1beta1.ValidationCA
ValidationCA.Builder
Specification of ValidationCA. Defines the mechanism to obtain the Certificate Authority certificate to validate the peer certificate.
Protobuf type google.cloud.networksecurity.v1beta1.ValidationCA
Interfaces
AuthorizationPolicy.Rule.Destination.HttpHeaderMatchOrBuilder
AuthorizationPolicy.Rule.DestinationOrBuilder
AuthorizationPolicy.Rule.SourceOrBuilder
AuthorizationPolicy.RuleOrBuilder
AuthorizationPolicyOrBuilder
CertificateProviderInstanceOrBuilder
CertificateProviderOrBuilder
ClientTlsPolicyOrBuilder
CreateAuthorizationPolicyRequestOrBuilder
CreateClientTlsPolicyRequestOrBuilder
CreateServerTlsPolicyRequestOrBuilder
DeleteAuthorizationPolicyRequestOrBuilder
DeleteClientTlsPolicyRequestOrBuilder
DeleteServerTlsPolicyRequestOrBuilder
GetAuthorizationPolicyRequestOrBuilder
GetClientTlsPolicyRequestOrBuilder
GetServerTlsPolicyRequestOrBuilder
GrpcEndpointOrBuilder
ListAuthorizationPoliciesRequestOrBuilder
ListAuthorizationPoliciesResponseOrBuilder
ListClientTlsPoliciesRequestOrBuilder
ListClientTlsPoliciesResponseOrBuilder
ListServerTlsPoliciesRequestOrBuilder
ListServerTlsPoliciesResponseOrBuilder
OperationMetadataOrBuilder
ServerTlsPolicy.MTLSPolicyOrBuilder
ServerTlsPolicyOrBuilder
UpdateAuthorizationPolicyRequestOrBuilder
UpdateClientTlsPolicyRequestOrBuilder
UpdateServerTlsPolicyRequestOrBuilder
ValidationCAOrBuilder
Enums
AuthorizationPolicy.Action
Possible values that define what action to take.
Protobuf enum google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action