Class CfnAccessPolicy
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IAccessPolicyRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
The AWS IoT SiteWise Monitor feature will no longer be open to new customers starting November 7, 2025 .
If you would like to use the AWS IoT SiteWise Monitor feature, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see AWS IoT SiteWise Monitor availability change .
Creates an access policy that grants the specified identity (IAM Identity Center user, IAM Identity Center group, or IAM user) access to the specified AWS IoT SiteWise Monitor portal or project resource.
Support for access policies that use an SSO Group as the identity is not supported at this time.
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.iotsitewise.*;
CfnAccessPolicy cfnAccessPolicy = CfnAccessPolicy.Builder.create(this, "MyCfnAccessPolicy")
.accessPolicyIdentity(AccessPolicyIdentityProperty.builder()
.iamRole(IamRoleProperty.builder()
.arn("arn")
.build())
.iamUser(IamUserProperty.builder()
.arn("arn")
.build())
.user(UserProperty.builder()
.id("id")
.build())
.build())
.accessPolicyPermission("accessPolicyPermission")
.accessPolicyResource(AccessPolicyResourceProperty.builder()
.portal(PortalProperty.builder()
.id("id")
.build())
.project(ProjectProperty.builder()
.id("id")
.build())
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe identity (IAM Identity Center user, IAM Identity Center group, or IAM user) to which this access policy applies.static interfaceThe AWS IoT SiteWise Monitor resource for this access policy.static final classA fluent builder forCfnAccessPolicy.static interfaceContains information about an AWS Identity and Access Management role.static interfaceContains information about an AWS Identity and Access Management user.static interfaceIdentifies an AWS IoT SiteWise Monitor portal.static interfaceIdentifies a specific AWS IoT SiteWise Monitor project.static interfaceContains information for a user identity in an access policy.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.iotsitewise.IAccessPolicyRef
IAccessPolicyRef.Jsii$Default, IAccessPolicyRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnAccessPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnAccessPolicy(software.amazon.jsii.JsiiObjectRef objRef) CfnAccessPolicy(software.constructs.Construct scope, String id, CfnAccessPolicyProps props) Create a newAWS::IoTSiteWise::AccessPolicy. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForAccessPolicy(IAccessPolicyRef resource) static IAccessPolicyReffromAccessPolicyArn(software.constructs.Construct scope, String id, String arn) Creates a new IAccessPolicyRef from an ARN.static IAccessPolicyReffromAccessPolicyId(software.constructs.Construct scope, String id, String accessPolicyId) Creates a new IAccessPolicyRef from a accessPolicyId.The identity for this access policy.The permission level for this access policy.A reference to a AccessPolicy resource.The AWS IoT SiteWise Monitor resource for this access policy.The ARN of the access policy, which has the following format.The ID of the access policy.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnAccessPolicy.renderProperties(Map<String, Object> props) voidThe identity for this access policy.voidThe identity for this access policy.voidsetAccessPolicyPermission(String value) The permission level for this access policy.voidThe AWS IoT SiteWise Monitor resource for this access policy.voidThe AWS IoT SiteWise Monitor resource for this access policy.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAccessPolicy
protected CfnAccessPolicy(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAccessPolicy
protected CfnAccessPolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAccessPolicy
@Stability(Stable) public CfnAccessPolicy(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnAccessPolicyProps props) Create a newAWS::IoTSiteWise::AccessPolicy.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForAccessPolicy
@Stability(Stable) @NotNull public static String arnForAccessPolicy(@NotNull IAccessPolicyRef resource) - Parameters:
resource- This parameter is required.
-
fromAccessPolicyArn
@Stability(Stable) @NotNull public static IAccessPolicyRef fromAccessPolicyArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IAccessPolicyRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromAccessPolicyId
@Stability(Stable) @NotNull public static IAccessPolicyRef fromAccessPolicyId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String accessPolicyId) Creates a new IAccessPolicyRef from a accessPolicyId.- Parameters:
scope- This parameter is required.id- This parameter is required.accessPolicyId- This parameter is required.
-
isCfnAccessPolicy
Checks whether the given object is a CfnAccessPolicy.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAccessPolicyRef
A reference to a AccessPolicy resource.- Specified by:
getAccessPolicyRefin interfaceIAccessPolicyRef
-
getAttrAccessPolicyArn
The ARN of the access policy, which has the following format.arn:${Partition}:iotsitewise:${Region}:${Account}:access-policy/${AccessPolicyId} -
getAttrAccessPolicyId
The ID of the access policy. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getAccessPolicyIdentity
The identity for this access policy.Returns union: either
IResolvableorCfnAccessPolicy.AccessPolicyIdentityProperty -
setAccessPolicyIdentity
The identity for this access policy. -
setAccessPolicyIdentity
@Stability(Stable) public void setAccessPolicyIdentity(@NotNull CfnAccessPolicy.AccessPolicyIdentityProperty value) The identity for this access policy. -
getAccessPolicyPermission
The permission level for this access policy. -
setAccessPolicyPermission
The permission level for this access policy. -
getAccessPolicyResource
The AWS IoT SiteWise Monitor resource for this access policy.Returns union: either
IResolvableorCfnAccessPolicy.AccessPolicyResourceProperty -
setAccessPolicyResource
The AWS IoT SiteWise Monitor resource for this access policy. -
setAccessPolicyResource
@Stability(Stable) public void setAccessPolicyResource(@NotNull CfnAccessPolicy.AccessPolicyResourceProperty value) The AWS IoT SiteWise Monitor resource for this access policy.
-