create_channel_namespace
async
¶
create_channel_namespace(
api_id: String,
name: Namespace,
*,
config_overrides: Optional[AsyncAppSyncClientConfig] = None,
subscribe_auth_modes: Optional[AuthModes] = None,
publish_auth_modes: Optional[AuthModes] = None,
code_handlers: Optional[Code] = None,
tags: Optional[TagMap] = None,
handler_configs: Optional[HandlerConfigs] = None,
) -> CreateChannelNamespaceResponse
Creates a ChannelNamespace for an Api.
Parameters:
-
api_id(String) –The
ApiID. -
name(Namespace) –The name of the
ChannelNamespace. This name must be unique within theApi -
subscribe_auth_modes(Optional[AuthModes], default:None) –The authorization mode to use for subscribing to messages on the channel namespace. This configuration overrides the default
Apiauthorization configuration. -
publish_auth_modes(Optional[AuthModes], default:None) –The authorization mode to use for publishing messages on the channel namespace. This configuration overrides the default
Apiauthorization configuration. -
code_handlers(Optional[Code], default:None) –The event handler functions that run custom business logic to process published events and subscribe requests.
-
handler_configs(Optional[HandlerConfigs], default:None) –The configuration for the
OnPublishandOnSubscribehandlers.
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.
-
ConflictException–A conflict with a previous successful update is detected. This typically occurs when the previous update did not have time to propagate before the next update was made. A retry (with appropriate backoff logic) is the recommended response to this exception.
-
InternalFailureException–An internal AppSync error occurred. Try your request again.
-
NotFoundException–The resource specified in the request was not found. Check the resource, and then try 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.
Source code in docs_src/capo_appsync/_services/async_app_sync.py
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 | |