Creates a new endpoint for an application or updates the settings and attributes of an existing endpoint for an application. You can also use this operation to define custom attributes for an endpoint. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values.
Parameters:
-
application_id
(__string)
–
The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.
-
endpoint_id
(__string)
–
The case insensitive unique identifier for the endpoint. The identifier can't contain $, { or }.
Raises:
Source code in docs_src/capo_pinpoint/_services/pinpoint.py
| def update_endpoint(
self,
application_id: "capo_pinpoint.types.__string.__string",
endpoint_id: "capo_pinpoint.types.__string.__string",
*,
config_overrides: Optional[PinpointClientConfig] = None,
endpoint_request: Optional[
"capo_pinpoint.types.endpoint_request.EndpointRequest"
] = None,
) -> "capo_pinpoint.types.update_endpoint_response.UpdateEndpointResponse":
"""<p>Creates a new endpoint for an application or updates the settings and attributes of an existing endpoint for an application. You can also use this operation to define custom attributes for an endpoint. If an update includes one or more values for a custom attribute, Amazon Pinpoint replaces (overwrites) any existing values with the new values.</p>
Args:
application_id: <p>The unique identifier for the application. This identifier is displayed as the <b>Project ID</b> on the Amazon Pinpoint console.</p>
endpoint_id: <p>The case insensitive unique identifier for the endpoint. The identifier can't contain <code>$</code>, <code>{</code> or <code>}</code>.</p>
Raises:
capo_pinpoint.errors.bad_request_exception.BadRequestException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.forbidden_exception.ForbiddenException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.internal_server_error_exception.InternalServerErrorException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.method_not_allowed_exception.MethodNotAllowedException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.not_found_exception.NotFoundException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.payload_too_large_exception.PayloadTooLargeException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.too_many_requests_exception.TooManyRequestsException: <p>Provides information about an API request or response.</p>
capo_pinpoint.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_pinpoint.types.update_endpoint_request.UpdateEndpointRequest]",
) -> OperationResponse[
"capo_pinpoint.types.update_endpoint_response.UpdateEndpointResponse"
]:
import capo_pinpoint._operations.pinpoint.update_endpoint
output, http_response = (
capo_pinpoint._operations.pinpoint.update_endpoint.update_endpoint(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateEndpoint")
)
input_: capo_pinpoint.types.update_endpoint_request.UpdateEndpointRequest = {
"application_id": application_id,
"endpoint_id": endpoint_id,
}
if endpoint_request is not None:
input_["endpoint_request"] = endpoint_request
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|