@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:20.960Z") @Stability(value=Stable) public class CfnResourcePolicy extends CfnResource implements IInspectable
Creates or updates a Systems Manager resource policy. A resource policy helps you to define the IAM entity (for example, an AWS account ) that can manage your Systems Manager resources. Currently, OpsItemGroup is the only resource that supports Systems Manager resource policies. The resource policy for OpsItemGroup enables AWS accounts to view and interact with OpsCenter operational work items (OpsItems). OpsCenter is a capability of Systems Manager .
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.ssm.*;
Object policy;
CfnResourcePolicy cfnResourcePolicy = CfnResourcePolicy.Builder.create(this, "MyCfnResourcePolicy")
.policy(policy)
.resourceArn("resourceArn")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnResourcePolicy.Builder
A fluent builder for
CfnResourcePolicy. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnResourcePolicy(Construct scope,
String id,
CfnResourcePolicyProps props)
Create a new `AWS::SSM::ResourcePolicy`.
|
protected |
CfnResourcePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnResourcePolicy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrPolicyHash()
ID of the current policy version.
|
String |
getAttrPolicyId()
ID of the current policy version.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getPolicy()
A policy you want to associate with a resource.
|
String |
getResourceArn()
Amazon Resource Name (ARN) of the resource to which you want to attach a policy.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setPolicy(Object value)
A policy you want to associate with a resource.
|
void |
setResourceArn(String value)
Amazon Resource Name (ARN) of the resource to which you want to attach a policy.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnResourcePolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnResourcePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnResourcePolicy(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnResourcePolicyProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrPolicyHash()
The hash helps to prevent a situation where multiple users attempt to overwrite a policy. You must provide this hash and the policy ID when updating or deleting a policy.
@Stability(value=Stable) @NotNull public String getAttrPolicyId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getPolicy()
@Stability(value=Stable)
public void setPolicy(@NotNull
Object value)
@Stability(value=Stable) @NotNull public String getResourceArn()
@Stability(value=Stable)
public void setResourceArn(@NotNull
String value)
Copyright © 2023. All rights reserved.