associateNetworkScopePrincipal

Associates an AWS account with a network scope as a principal. The network scope must be in the AVAILABLE state, and the account can't already be a principal of the network scope in any state. To associate a principal again, disassociate it and wait until ListNetworkScopePrincipals no longer returns it. The principal is returned in a transitional state. To track it, call ListNetworkScopePrincipals. An association becomes ASSOCIATED or FAILED. A disassociated principal is removed and is no longer returned.

Samples

// Example Associating an account with a network scope
val resp = networkManagerClient.associateNetworkScopePrincipal {
    networkScopeId = "network-scope-0123456789abcdef0"
    principal = "444455556666"
}