createOneTimeDeepLinkCode

Generates a one-time code for deep-link authentication. Direct the user's browser to the returned deepLinkUrl before it expires. The code is exchanged for an authenticated, domain-scoped session and can be used only once.

Samples

// The following example creates a one time deep link code for a domain that remains valid for 300
// seconds and, once used, redirects the browser to the domain s auth callback path. Direct the user s browser
// to the returned deepLinkUrl before it expires the code can be used only once. Payloads are shown as
// JSON on the wire they are CBOR encoded.
val resp = cloudWatchOmniClient.createOneTimeDeepLinkCode {
    domainId = "d-1a2b3c4d5e"
    ttlSeconds = 300
    redirectUrl = "https://d-1a2b3c4d5e.cloudwatch-omni.global.app.aws/auth/callback"
}