getCoreNetworkPolicy method

Future<GetCoreNetworkPolicyResponse> getCoreNetworkPolicy({
  1. required String coreNetworkId,
  2. CoreNetworkPolicyAlias? alias,
  3. int? policyVersionId,
})

Returns details about a core network policy. You can get details about your current live policy or any previous policy version.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter coreNetworkId : The ID of a core network.

Parameter alias : The alias of a core network policy

Parameter policyVersionId : The ID of a core network policy version.

Implementation

Future<GetCoreNetworkPolicyResponse> getCoreNetworkPolicy({
  required String coreNetworkId,
  CoreNetworkPolicyAlias? alias,
  int? policyVersionId,
}) async {
  final $query = <String, List<String>>{
    if (alias != null) 'alias': [alias.value],
    if (policyVersionId != null)
      'policyVersionId': [policyVersionId.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/core-networks/${Uri.encodeComponent(coreNetworkId)}/core-network-policy',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetCoreNetworkPolicyResponse.fromJson(response);
}