From a datashare consumer account, remove association for the specified datashare.
Parameters:
-
data_share_arn
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) of the datashare to remove association for.
-
disassociate_entire_account
(Optional[BooleanOptional], default:
None
)
–
A value that specifies whether association for the datashare is removed from the entire account.
-
consumer_arn
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) of the consumer namespace that association for the datashare is removed from.
-
consumer_region
(Optional[String], default:
None
)
–
From a datashare consumer account, removes association of a datashare from all the existing and future namespaces in the specified Amazon Web Services Region.
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def disassociate_data_share_consumer(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
data_share_arn: Optional["capo_redshift.types.string.String"] = None,
disassociate_entire_account: Optional[
"capo_redshift.types.boolean_optional.BooleanOptional"
] = None,
consumer_arn: Optional["capo_redshift.types.string.String"] = None,
consumer_region: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.data_share.DataShare":
"""<p>From a datashare consumer account, remove association for the specified datashare. </p>
Args:
data_share_arn: <p>The Amazon Resource Name (ARN) of the datashare to remove association for.</p>
disassociate_entire_account: <p>A value that specifies whether association for the datashare is removed from the entire account.</p>
consumer_arn: <p>The Amazon Resource Name (ARN) of the consumer namespace that association for the datashare is removed from.</p>
consumer_region: <p>From a datashare consumer account, removes association of a datashare from all the existing and future namespaces in the specified Amazon Web Services Region.</p>
Raises:
capo_redshift.errors.invalid_data_share_fault.InvalidDataShareFault: <p>There is an error with the datashare.</p>
capo_redshift.errors.invalid_namespace_fault.InvalidNamespaceFault: <p>The namespace isn't valid because the namespace doesn't exist. Provide a valid namespace.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.disassociate_data_share_consumer_message.DisassociateDataShareConsumerMessage]",
) -> AsyncOperationResponse["capo_redshift.types.data_share.DataShare"]:
import capo_redshift._operations.redshift_service_version20121201.disassociate_data_share_consumer
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.disassociate_data_share_consumer.async_disassociate_data_share_consumer(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateDataShareConsumer")
)
input_: capo_redshift.types.disassociate_data_share_consumer_message.DisassociateDataShareConsumerMessage = {}
if data_share_arn is not None:
input_["data_share_arn"] = data_share_arn
if disassociate_entire_account is not None:
input_["disassociate_entire_account"] = disassociate_entire_account
if consumer_arn is not None:
input_["consumer_arn"] = consumer_arn
if consumer_region is not None:
input_["consumer_region"] = consumer_region
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|