Updates the name and/or outputs in a feed.
UpdateFeed is a PUT operation, which means that the payload that you specify completely overwrites the existing payload.
This means that if you want to touch the array of outputs, you must pass in the full new list. So you must omit outputs you want to delete, and include outputs you want to add or modify.
If you want to patch the array of outputs to make selective additions, use AssociateFeed.
Parameters:
-
name
(ResourceName)
–
Required. You can specify the existing name (to leave it unchanged) or a new name.
-
access_role_arn
(Optional[IamRoleArn], default:
None
)
–
The ARN of an IAM role that Elemental Inference assumes to access resources in your account on your behalf. You can specify the existing role (to leave it unchanged) or a new role. You specify one access role for each feed.
-
id
(FeedId)
–
The ID of the feed to update.
-
outputs
(UpdateOutputList)
–
Required. You can specify the existing array of outputs (to leave outputs unchanged) or you can specify a new array.
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
ConflictException
–
The request could not be completed due to a conflict.
-
InternalServerErrorException
–
An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.
-
ResourceNotFoundException
–
The resource specified in the action doesn't exist.
-
ServiceQuotaExceededException
–
The request was rejected because it would exceed one or more service quotas for your account. Review your service quotas and either delete unused resources or request a quota increase.
-
TooManyRequestException
–
The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.
-
ValidationException
–
The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_elementalinference/_services/async_elemental_inference.py
| async def update_feed(
self,
name: "capo_elementalinference.types.resource_name.ResourceName",
id: "capo_elementalinference.types.feed_id.FeedId",
outputs: "capo_elementalinference.types.update_output_list.UpdateOutputList",
*,
config_overrides: Optional[AsyncElementalInferenceClientConfig] = None,
access_role_arn: Optional[
"capo_elementalinference.types.iam_role_arn.IamRoleArn"
] = None,
) -> "capo_elementalinference.types.update_feed_response.UpdateFeedResponse":
"""<p>Updates the name and/or outputs in a feed. </p> <p>UpdateFeed is a PUT operation, which means that the payload that you specify completely overwrites the existing payload. </p> <p>This means that if you want to touch the array of outputs, you must pass in the full new list. So you must omit outputs you want to delete, and include outputs you want to add or modify. </p> <p>If you want to patch the array of outputs to make selective additions, use AssociateFeed. </p>
Args:
name: <p>Required. You can specify the existing name (to leave it unchanged) or a new name. </p>
access_role_arn: <p>The ARN of an IAM role that Elemental Inference assumes to access resources in your account on your behalf. You can specify the existing role (to leave it unchanged) or a new role. You specify one access role for each feed. </p>
id: <p>The ID of the feed to update.</p>
outputs: <p>Required. You can specify the existing array of outputs (to leave outputs unchanged) or you can specify a new array. </p>
Raises:
capo_elementalinference.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_elementalinference.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict.</p>
capo_elementalinference.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support. </p>
capo_elementalinference.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the action doesn't exist.</p>
capo_elementalinference.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request was rejected because it would exceed one or more service quotas for your account. Review your service quotas and either delete unused resources or request a quota increase. </p>
capo_elementalinference.errors.too_many_request_exception.TooManyRequestException: <p>The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying. </p>
capo_elementalinference.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying. </p>
capo_elementalinference.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elementalinference.types.update_feed_request.UpdateFeedRequest]",
) -> AsyncOperationResponse[
"capo_elementalinference.types.update_feed_response.UpdateFeedResponse"
]:
import capo_elementalinference._operations.elemental_inference.update_feed
(
output,
http_response,
) = await capo_elementalinference._operations.elemental_inference.update_feed.async_update_feed(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateFeed")
)
input_: capo_elementalinference.types.update_feed_request.UpdateFeedRequest = {
"name": name,
"id": id,
"outputs": outputs,
}
if access_role_arn is not None:
input_["access_role_arn"] = access_role_arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|