Service for the securityPolicies resource.
https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
SecurityPoliciesClient(SecurityPoliciesClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SecurityPoliciesClient const &
|
SecurityPoliciesClient(SecurityPoliciesClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SecurityPoliciesClient &&
|
SecurityPoliciesClient(std::shared_ptr< SecurityPoliciesConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< SecurityPoliciesConnection >
|
opts |
Options
|
Operators
operator=(SecurityPoliciesClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SecurityPoliciesClient const &
|
Returns | |
---|---|
Type | Description |
SecurityPoliciesClient & |
operator=(SecurityPoliciesClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
SecurityPoliciesClient &&
|
Returns | |
---|---|
Type | Description |
SecurityPoliciesClient & |
Functions
AddRule(std::string const &, std::string const &, google::cloud::cpp::compute::v1::SecurityPolicyRule const &, Options)
Inserts a rule into a security policy.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to update. |
security_policy_rule_resource |
google::cloud::cpp::compute::v1::SecurityPolicyRule const &
The SecurityPolicyRule for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
AddRule(google::cloud::cpp::compute::security_policies::v1::AddRuleRequest const &, Options)
Inserts a rule into a security policy.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::AddRuleRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
AggregatedListSecurityPolicies(std::string const &, Options)
Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Name of the project scoping this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::SecurityPoliciesScopedList > > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
AggregatedListSecurityPolicies(google::cloud::cpp::compute::security_policies::v1::AggregatedListSecurityPoliciesRequest, Options)
Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::AggregatedListSecurityPoliciesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< std::pair< std::string, google::cloud::cpp::compute::v1::SecurityPoliciesScopedList > > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
DeleteSecurityPolicy(std::string const &, std::string const &, Options)
Deletes the specified policy.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to delete. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
DeleteSecurityPolicy(google::cloud::cpp::compute::security_policies::v1::DeleteSecurityPolicyRequest const &, Options)
Deletes the specified policy.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::DeleteSecurityPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
GetSecurityPolicy(std::string const &, std::string const &, Options)
List all of the ordered rules present in a single specified policy.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to get. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::cpp::compute::v1::SecurityPolicy > | the result of the RPC. The response message type (google.cloud.cpp.compute.v1.SecurityPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetSecurityPolicy(google::cloud::cpp::compute::security_policies::v1::GetSecurityPolicyRequest const &, Options)
List all of the ordered rules present in a single specified policy.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::GetSecurityPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::cpp::compute::v1::SecurityPolicy > | the result of the RPC. The response message type (google.cloud.cpp.compute.v1.SecurityPolicy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetRule(std::string const &, std::string const &, Options)
Gets a rule at the specified priority.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to which the queried rule belongs. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::cpp::compute::v1::SecurityPolicyRule > | the result of the RPC. The response message type (google.cloud.cpp.compute.v1.SecurityPolicyRule) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetRule(google::cloud::cpp::compute::security_policies::v1::GetRuleRequest const &, Options)
Gets a rule at the specified priority.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::GetRuleRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::cpp::compute::v1::SecurityPolicyRule > | the result of the RPC. The response message type (google.cloud.cpp.compute.v1.SecurityPolicyRule) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
InsertSecurityPolicy(std::string const &, google::cloud::cpp::compute::v1::SecurityPolicy const &, Options)
Creates a new policy in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy_resource |
google::cloud::cpp::compute::v1::SecurityPolicy const &
The SecurityPolicy for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
InsertSecurityPolicy(google::cloud::cpp::compute::security_policies::v1::InsertSecurityPolicyRequest const &, Options)
Creates a new policy in the specified project using the data included in the request.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::InsertSecurityPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
ListSecurityPolicies(std::string const &, Options)
List all the policies that have been configured for the specified project.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::cpp::compute::v1::SecurityPolicy > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListSecurityPolicies(google::cloud::cpp::compute::security_policies::v1::ListSecurityPoliciesRequest, Options)
List all the policies that have been configured for the specified project.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::ListSecurityPoliciesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::cpp::compute::v1::SecurityPolicy > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListPreconfiguredExpressionSets(std::string const &, Options)
Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::cpp::compute::v1::SecurityPoliciesListPreconfiguredExpressionSetsResponse > | the result of the RPC. The response message type (google.cloud.cpp.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListPreconfiguredExpressionSets(google::cloud::cpp::compute::security_policies::v1::ListPreconfiguredExpressionSetsRequest const &, Options)
Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::ListPreconfiguredExpressionSetsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::cpp::compute::v1::SecurityPoliciesListPreconfiguredExpressionSetsResponse > | the result of the RPC. The response message type (google.cloud.cpp.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
PatchSecurityPolicy(std::string const &, std::string const &, std::string const &, google::cloud::cpp::compute::v1::SecurityPolicy const &, Options)
Patches the specified policy with the data included in the request.
To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead. https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/patch
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to update. |
update_mask |
std::string const &
Indicates fields to be cleared as part of this request. |
security_policy_resource |
google::cloud::cpp::compute::v1::SecurityPolicy const &
The SecurityPolicy for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
PatchSecurityPolicy(google::cloud::cpp::compute::security_policies::v1::PatchSecurityPolicyRequest const &, Options)
Patches the specified policy with the data included in the request.
To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead. https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/patch
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::PatchSecurityPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
PatchRule(std::string const &, std::string const &, google::cloud::cpp::compute::v1::SecurityPolicyRule const &, Options)
Patches a rule at the specified priority.
To clear fields in the rule, leave the fields empty and specify them in the updateMask. https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/patchRule
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to update. |
security_policy_rule_resource |
google::cloud::cpp::compute::v1::SecurityPolicyRule const &
The SecurityPolicyRule for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
PatchRule(google::cloud::cpp::compute::security_policies::v1::PatchRuleRequest const &, Options)
Patches a rule at the specified priority.
To clear fields in the rule, leave the fields empty and specify them in the updateMask. https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/patchRule
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::PatchRuleRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
RemoveRule(std::string const &, std::string const &, Options)
Deletes a rule at the specified priority.
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
security_policy |
std::string const &
Name of the security policy to update. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
RemoveRule(google::cloud::cpp::compute::security_policies::v1::RemoveRuleRequest const &, Options)
Deletes a rule at the specified priority.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::RemoveRuleRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
SetLabels(std::string const &, std::string const &, google::cloud::cpp::compute::v1::GlobalSetLabelsRequest const &, Options)
Sets the labels on a security policy.
To learn more about labels, read the Labeling Resources documentation. https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/setLabels
Parameters | |
---|---|
Name | Description |
project |
std::string const &
Project ID for this request. |
resource |
std::string const &
Name or id of the resource for this request. |
global_set_labels_request_resource |
google::cloud::cpp::compute::v1::GlobalSetLabelsRequest const &
The GlobalSetLabelsRequest for this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |
SetLabels(google::cloud::cpp::compute::security_policies::v1::SetLabelsRequest const &, Options)
Sets the labels on a security policy.
To learn more about labels, read the Labeling Resources documentation. https://cloud.google.com/compute/docs/reference/rest/v1/securityPolicies/setLabels
Parameters | |
---|---|
Name | Description |
request |
google::cloud::cpp::compute::security_policies::v1::SetLabelsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::cpp::compute::v1::Operation > > | A |