create_api
async
¶
create_api(
name: ApiName,
event_config: EventConfig,
*,
config_overrides: Optional[AsyncAppSyncClientConfig] = None,
owner_contact: Optional[String] = None,
tags: Optional[TagMap] = None,
) -> CreateApiResponse
Creates an Api object. Use this operation to create an AppSync API with your preferred configuration, such as an Event API that provides real-time message publishing and message subscriptions over WebSockets.
Parameters:
-
name(ApiName) –The name for the
Api. -
owner_contact(Optional[String], default:None) –The owner contact information for the
Api. -
event_config(EventConfig) –The Event API configuration. This includes the default authorization configuration for connecting, publishing, and subscribing to an Event API.
Raises:
-
BadRequestException–The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.
-
ConcurrentModificationException–Another modification is in progress at this time and it must complete before you can make your change.
-
InternalFailureException–An internal AppSync error occurred. Try your request again.
-
ServiceQuotaExceededException–The operation exceeded the service quota for this resource.
-
UnauthorizedException–You aren't authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.