@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.790Z") @Stability(value=Stable) public class UnknownPrincipal extends software.amazon.jsii.JsiiObject implements IPrincipal
Some resources have roles associated with them which they assume, such as Lambda Functions, CodeBuild projects, StepFunctions machines, etc.
When those resources are imported, their actual roles are not always imported with them. When that happens, we use an instance of this class instead, which will add user warnings when statements are attempted to be added to it.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iam.*;
import software.constructs.*;
Construct construct;
UnknownPrincipal unknownPrincipal = UnknownPrincipal.Builder.create()
.resource(construct)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
UnknownPrincipal.Builder
A fluent builder for
UnknownPrincipal. |
software.amazon.jsii.JsiiObject.InitializationModeIPrincipal.Jsii$Default, IPrincipal.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
protected |
UnknownPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
UnknownPrincipal(software.amazon.jsii.JsiiObjectRef objRef) |
|
UnknownPrincipal(UnknownPrincipalProps props) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
addToPolicy(PolicyStatement statement)
Add to the policy of this principal.
|
AddToPrincipalPolicyResult |
addToPrincipalPolicy(PolicyStatement statement)
Add to the policy of this principal.
|
String |
getAssumeRoleAction()
When this Principal is used in an AssumeRole policy, the action to use.
|
IPrincipal |
getGrantPrincipal()
The principal to grant permissions to.
|
PrincipalPolicyFragment |
getPolicyFragment()
Return the policy fragment that identifies this principal in a Policy.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPrincipalAccountprotected UnknownPrincipal(software.amazon.jsii.JsiiObjectRef objRef)
protected UnknownPrincipal(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public UnknownPrincipal(@NotNull
UnknownPrincipalProps props)
props - This parameter is required.@Stability(value=Stable) @NotNull public Boolean addToPolicy(@NotNull PolicyStatement statement)
statement - This parameter is required.@Stability(value=Stable) @NotNull public AddToPrincipalPolicyResult addToPrincipalPolicy(@NotNull PolicyStatement statement)
addToPrincipalPolicy in interface IPrincipalstatement - This parameter is required.@Stability(value=Stable) @NotNull public String getAssumeRoleAction()
getAssumeRoleAction in interface IPrincipal@Stability(value=Stable) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Stable) @NotNull public PrincipalPolicyFragment getPolicyFragment()
getPolicyFragment in interface IPrincipalCopyright © 2022. All rights reserved.