get method
Get a security profile v2.
Request parameters:
name - Required. The name of the security profile v2 to get. Format:
organizations/{org}/securityProfilesV2/{profile}
Value must have pattern
^organizations/\[^/\]+/securityProfilesV2/\[^/\]+$.
riskAssessmentType - Optional. The risk assessment type of the security
profile. Defaults to ADVANCED_API_SECURITY.
Possible string values are:
- "RISK_ASSESSMENT_TYPE_UNSPECIFIED" : Risk assessment type is not specified.
- "APIGEE" : Risk assessment type is Apigee.
- "API_HUB" : Risk assessment type is API Hub.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudApigeeV1SecurityProfileV2.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleCloudApigeeV1SecurityProfileV2> get(
core.String name, {
core.String? riskAssessmentType,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'riskAssessmentType': ?riskAssessmentType == null
? null
: [riskAssessmentType],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudApigeeV1SecurityProfileV2.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}