getModelPackageGroupPolicy method

Future<GetModelPackageGroupPolicyOutput> getModelPackageGroupPolicy({
  1. required String modelPackageGroupName,
})

Gets a resource policy that manages access for a model group. For information about resource policies, see Identity-based policies and resource-based policies in the AWS Identity and Access Management User Guide..

Parameter modelPackageGroupName : The name of the model group for which to get the resource policy.

Implementation

Future<GetModelPackageGroupPolicyOutput> getModelPackageGroupPolicy({
  required String modelPackageGroupName,
}) async {
  ArgumentError.checkNotNull(modelPackageGroupName, 'modelPackageGroupName');
  _s.validateStringLength(
    'modelPackageGroupName',
    modelPackageGroupName,
    1,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.GetModelPackageGroupPolicy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ModelPackageGroupName': modelPackageGroupName,
    },
  );

  return GetModelPackageGroupPolicyOutput.fromJson(jsonResponse.body);
}