register_opentdf_config
¶
register_opentdf_config(
network_id: NetworkId,
client_id: GenericString,
client_secret: SensitiveString,
domain: GenericString,
provider: GenericString,
*,
config_overrides: Optional[WickrClientConfig] = None,
dry_run: Optional[bool] = None,
) -> RegisterOpentdfConfigResponse
Registers and saves OpenTDF configuration for a Wickr network, enabling attribute-based access control for Wickr through an OpenTDF provider.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network for which OpenTDF integration will be configured.
-
client_id(GenericString) –The OIDC client ID used for authenticating with the OpenTDF provider.
-
client_secret(SensitiveString) –The OIDC client secret used for authenticating with the OpenTDF provider
-
domain(GenericString) –The domain of the OpenTDF server.
-
provider(GenericString) –The provider of the OpenTDF platform.
Currently only Virtru is supported as the OpenTDF provider.
-
dry_run(Optional[bool], default:None) –Perform dry-run test connection of OpenTDF configuration (optional).
Raises:
-
BadRequestError–The request was invalid or malformed. This error occurs when the request parameters do not meet the API requirements, such as invalid field values, missing required parameters, or improperly formatted data.
-
ForbiddenError–Access to the requested resource is forbidden. This error occurs when the authenticated user does not have the necessary permissions to perform the requested operation, even though they are authenticated.
-
InternalServerError–An unexpected error occurred on the server while processing the request. This indicates a problem with the Wickr service itself rather than with the request. If this error persists, contact Amazon Web Services Support.
-
RateLimitError–The request was throttled because too many requests were sent in a short period of time. Wait a moment and retry the request. Consider implementing exponential backoff in your application.
-
ResourceNotFoundError–The requested resource could not be found. This error occurs when you try to access or modify a network, user, bot, security group, or other resource that doesn't exist or has been deleted.
-
UnauthorizedError–The request was not authenticated or the authentication credentials were invalid. This error occurs when the request lacks valid authentication credentials or the credentials have expired.
-
ValidationError–One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Save OpenTDF config successfully
>>> client.register_opentdf_config(network_id='12345678', client_id='client123', client_secret='secret456', domain='https://api.sample.com', provider='virtru')
Dry run saving OpenTDF config
>>> client.register_opentdf_config(network_id='12345678', client_id='client123', client_secret='secret456', domain='https://api.sample.com', provider='virtru', dry_run=True)
Dry run saving OpenTDF config - failed test
>>> client.register_opentdf_config(network_id='12345678', client_id='client123', client_secret='secret456', domain='https://api.sample.com', provider='virtru', dry_run=True)
Save OpenTDF config - invalid provider
>>> client.register_opentdf_config(network_id='12345678', client_id='client123', client_secret='secret456', domain='https://api.sample.com', provider='invalid provider')
Save OpenTDF config - network not found
>>> client.register_opentdf_config(network_id='99999999', client_id='client123', client_secret='secret456', domain='https://api.sample.com', provider='virtru')
Source code in docs_src/capo_wickr/_services/wickr.py
3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 | |