Class CfnPolicy
A CloudFormation AWS::IoT::Policy
.
Inherited Members
Namespace: Amazon.CDK.AWS.IoT
Assembly: Amazon.CDK.AWS.IoT.dll
Syntax (csharp)
public class CfnPolicy : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnPolicy
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
Use the AWS::IoT::Policy
resource to declare an AWS IoT policy. For more information about working with AWS IoT policies, see Authorization in the AWS IoT Developer Guide .
CloudformationResource: AWS::IoT::Policy
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iot-policy.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoT;
var policyDocument;
var cfnPolicy = new CfnPolicy(this, "MyCfnPolicy", new CfnPolicyProps {
PolicyDocument = policyDocument,
// the properties below are optional
PolicyName = "policyName"
});
Synopsis
Constructors
CfnPolicy(Construct, String, ICfnPolicyProps) | Create a new |
CfnPolicy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnPolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the AWS IoT policy, such as |
AttrId | The name of this policy. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
PolicyDocument | The JSON document that describes the policy. |
PolicyName | The policy name. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnPolicy(Construct, String, ICfnPolicyProps)
Create a new AWS::IoT::Policy
.
public CfnPolicy(Construct scope, string id, ICfnPolicyProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnPolicyProps
- resource properties.
CfnPolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnPolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnPolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnPolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy
.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The name of this policy.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
PolicyDocument
The JSON document that describes the policy.
public virtual object PolicyDocument { get; set; }
Property Value
System.Object
Remarks
PolicyName
The policy name.
public virtual string PolicyName { get; set; }
Property Value
System.String
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>