AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the CreateResourcePolicyStatement operation. Adds a new resource policy statement to a bot or bot alias. If a resource policy exists, the statement is added to the current resource policy. If a policy doesn't exist, a new policy is created.

You can't create a resource policy statement that allows cross-account access.

You need to add the CreateResourcePolicy or UpdateResourcePolicy action to the bot role in order to call the API.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.LexModelsV2.AmazonLexModelsV2Request
      Amazon.LexModelsV2.Model.CreateResourcePolicyStatementRequest

Namespace: Amazon.LexModelsV2.Model
Assembly: AWSSDK.LexModelsV2.dll
Version: 3.x.y.z

Syntax

C#
public class CreateResourcePolicyStatementRequest : AmazonLexModelsV2Request
         IAmazonWebServiceRequest

The CreateResourcePolicyStatementRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property Action System.Collections.Generic.List<System.String>

Gets and sets the property Action.

The Amazon Lex action that this policy either allows or denies. The action must apply to the resource type of the specified ARN. For more information, see Actions, resources, and condition keys for Amazon Lex V2.

Public Property Condition System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<System.String, System.String>>

Gets and sets the property Condition.

Specifies a condition when the policy is in effect. If the principal of the policy is a service principal, you must provide two condition blocks, one with a SourceAccount global condition key and one with a SourceArn global condition key.

For more information, see IAM JSON policy elements: Condition .

Public Property Effect Amazon.LexModelsV2.Effect

Gets and sets the property Effect.

Determines whether the statement allows or denies access to the resource.

Public Property ExpectedRevisionId System.String

Gets and sets the property ExpectedRevisionId.

The identifier of the revision of the policy to edit. If this revision ID doesn't match the current revision ID, Amazon Lex throws an exception.

If you don't specify a revision, Amazon Lex overwrites the contents of the policy with the new values.

Public Property Principal System.Collections.Generic.List<Amazon.LexModelsV2.Model.Principal>

Gets and sets the property Principal.

An IAM principal, such as an IAM user, IAM role, or Amazon Web Services services that is allowed or denied access to a resource. For more information, see Amazon Web Services JSON policy elements: Principal.

Public Property ResourceArn System.String

Gets and sets the property ResourceArn.

The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.

Public Property StatementId System.String

Gets and sets the property StatementId.

The name of the statement. The ID is the same as the Sid IAM property. The statement name must be unique within the policy. For more information, see IAM JSON policy elements: Sid.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5