createTopicRefreshSchedule method

Future<CreateTopicRefreshScheduleResponse> createTopicRefreshSchedule({
  1. required String awsAccountId,
  2. required String datasetArn,
  3. required TopicRefreshSchedule refreshSchedule,
  4. required String topicId,
  5. String? datasetName,
})

Creates a topic refresh schedule.

May throw AccessDeniedException. May throw ConflictException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account that contains the topic you're creating a refresh schedule for.

Parameter datasetArn : The Amazon Resource Name (ARN) of the dataset.

Parameter refreshSchedule : The definition of a refresh schedule.

Parameter topicId : The ID of the topic that you want to modify. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

Parameter datasetName : The name of the dataset.

Implementation

Future<CreateTopicRefreshScheduleResponse> createTopicRefreshSchedule({
  required String awsAccountId,
  required String datasetArn,
  required TopicRefreshSchedule refreshSchedule,
  required String topicId,
  String? datasetName,
}) async {
  final $payload = <String, dynamic>{
    'DatasetArn': datasetArn,
    'RefreshSchedule': refreshSchedule,
    if (datasetName != null) 'DatasetName': datasetName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/topics/${Uri.encodeComponent(topicId)}/schedules',
    exceptionFnMap: _exceptionFns,
  );
  return CreateTopicRefreshScheduleResponse.fromJson(response);
}