1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. iot
  5. getPolicy

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

aws-native.iot.getPolicy

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi

Resource Type definition for AWS::IoT::Policy

Using getPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPolicy(args: GetPolicyArgs, opts?: InvokeOptions): Promise<GetPolicyResult>
function getPolicyOutput(args: GetPolicyOutputArgs, opts?: InvokeOptions): Output<GetPolicyResult>
Copy
def get_policy(id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetPolicyResult
def get_policy_output(id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetPolicyResult]
Copy
func LookupPolicy(ctx *Context, args *LookupPolicyArgs, opts ...InvokeOption) (*LookupPolicyResult, error)
func LookupPolicyOutput(ctx *Context, args *LookupPolicyOutputArgs, opts ...InvokeOption) LookupPolicyResultOutput
Copy

> Note: This function is named LookupPolicy in the Go SDK.

public static class GetPolicy 
{
    public static Task<GetPolicyResult> InvokeAsync(GetPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetPolicyResult> Invoke(GetPolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
public static Output<GetPolicyResult> getPolicy(GetPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws-native:iot:getPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
The name of this policy.
Id This property is required. string
The name of this policy.
id This property is required. String
The name of this policy.
id This property is required. string
The name of this policy.
id This property is required. str
The name of this policy.
id This property is required. String
The name of this policy.

getPolicy Result

The following output properties are available:

Arn string
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy .
Id string
The name of this policy.
PolicyDocument object

The JSON document that describes the policy.

Search the CloudFormation User Guide for AWS::IoT::Policy for more information about the expected schema for this property.

Tags List<Pulumi.AwsNative.Outputs.Tag>
Arn string
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy .
Id string
The name of this policy.
PolicyDocument interface{}

The JSON document that describes the policy.

Search the CloudFormation User Guide for AWS::IoT::Policy for more information about the expected schema for this property.

Tags Tag
arn String
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy .
id String
The name of this policy.
policyDocument Object

The JSON document that describes the policy.

Search the CloudFormation User Guide for AWS::IoT::Policy for more information about the expected schema for this property.

tags List<Tag>
arn string
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy .
id string
The name of this policy.
policyDocument any

The JSON document that describes the policy.

Search the CloudFormation User Guide for AWS::IoT::Policy for more information about the expected schema for this property.

tags Tag[]
arn str
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy .
id str
The name of this policy.
policy_document Any

The JSON document that describes the policy.

Search the CloudFormation User Guide for AWS::IoT::Policy for more information about the expected schema for this property.

tags Sequence[root_Tag]
arn String
The Amazon Resource Name (ARN) of the AWS IoT policy, such as arn:aws:iot:us-east-2:123456789012:policy/MyPolicy .
id String
The name of this policy.
policyDocument Any

The JSON document that describes the policy.

Search the CloudFormation User Guide for AWS::IoT::Policy for more information about the expected schema for this property.

tags List<Property Map>

Supporting Types

Tag

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi