From a data producer account, authorizes the sharing of a datashare with one or more consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account must have the correct access permissions.
Parameters:
-
data_share_arn
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) of the datashare namespace that producers are to authorize sharing for.
-
consumer_identifier
(Optional[String], default:
None
)
–
The identifier of the data consumer that is authorized to access the datashare. This identifier is an Amazon Web Services account ID or a keyword, such as ADX.
-
allow_writes
(Optional[BooleanOptional], default:
None
)
–
If set to true, allows write operations for a datashare.
Raises:
Source code in docs_src/capo_redshift/_services/async_redshift.py
| async def authorize_data_share(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
data_share_arn: Optional["capo_redshift.types.string.String"] = None,
consumer_identifier: Optional["capo_redshift.types.string.String"] = None,
allow_writes: Optional[
"capo_redshift.types.boolean_optional.BooleanOptional"
] = None,
) -> "capo_redshift.types.data_share.DataShare":
"""<p>From a data producer account, authorizes the sharing of a datashare with one or more consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account must have the correct access permissions.</p>
Args:
data_share_arn: <p>The Amazon Resource Name (ARN) of the datashare namespace that producers are to authorize sharing for.</p>
consumer_identifier: <p>The identifier of the data consumer that is authorized to access the datashare. This identifier is an Amazon Web Services account ID or a keyword, such as ADX.</p>
allow_writes: <p>If set to true, allows write operations for a datashare.</p>
Raises:
capo_redshift.errors.invalid_data_share_fault.InvalidDataShareFault: <p>There is an error with the datashare.</p>
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.authorize_data_share_message.AuthorizeDataShareMessage]",
) -> AsyncOperationResponse["capo_redshift.types.data_share.DataShare"]:
import capo_redshift._operations.redshift_service_version20121201.authorize_data_share
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.authorize_data_share.async_authorize_data_share(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AuthorizeDataShare")
)
input_: capo_redshift.types.authorize_data_share_message.AuthorizeDataShareMessage = {}
if data_share_arn is not None:
input_["data_share_arn"] = data_share_arn
if consumer_identifier is not None:
input_["consumer_identifier"] = consumer_identifier
if allow_writes is not None:
input_["allow_writes"] = allow_writes
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|