CfnGraphQLApi

class aws_cdk.aws_appsync.CfnGraphQLApi(scope, id, *, authentication_type, name, additional_authentication_providers=None, lambda_authorizer_config=None, log_config=None, open_id_connect_config=None, tags=None, user_pool_config=None, xray_enabled=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::AppSync::GraphQLApi.

The AWS::AppSync::GraphQLApi resource creates a new AWS AppSync GraphQL API. This is the top-level construct for your application. For more information, see Quick Start in the AWS AppSync Developer Guide .

CloudformationResource

AWS::AppSync::GraphQLApi

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

cfn_graph_qLApi = appsync.CfnGraphQLApi(self, "MyCfnGraphQLApi",
    authentication_type="authenticationType",
    name="name",

    # the properties below are optional
    additional_authentication_providers=[appsync.CfnGraphQLApi.AdditionalAuthenticationProviderProperty(
        authentication_type="authenticationType",

        # the properties below are optional
        lambda_authorizer_config=appsync.CfnGraphQLApi.LambdaAuthorizerConfigProperty(
            authorizer_result_ttl_in_seconds=123,
            authorizer_uri="authorizerUri",
            identity_validation_expression="identityValidationExpression"
        ),
        open_id_connect_config=appsync.CfnGraphQLApi.OpenIDConnectConfigProperty(
            auth_ttl=123,
            client_id="clientId",
            iat_ttl=123,
            issuer="issuer"
        ),
        user_pool_config=appsync.CfnGraphQLApi.CognitoUserPoolConfigProperty(
            app_id_client_regex="appIdClientRegex",
            aws_region="awsRegion",
            user_pool_id="userPoolId"
        )
    )],
    lambda_authorizer_config=appsync.CfnGraphQLApi.LambdaAuthorizerConfigProperty(
        authorizer_result_ttl_in_seconds=123,
        authorizer_uri="authorizerUri",
        identity_validation_expression="identityValidationExpression"
    ),
    log_config=appsync.CfnGraphQLApi.LogConfigProperty(
        cloud_watch_logs_role_arn="cloudWatchLogsRoleArn",
        exclude_verbose_content=False,
        field_log_level="fieldLogLevel"
    ),
    open_id_connect_config=appsync.CfnGraphQLApi.OpenIDConnectConfigProperty(
        auth_ttl=123,
        client_id="clientId",
        iat_ttl=123,
        issuer="issuer"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    user_pool_config=appsync.CfnGraphQLApi.UserPoolConfigProperty(
        app_id_client_regex="appIdClientRegex",
        aws_region="awsRegion",
        default_action="defaultAction",
        user_pool_id="userPoolId"
    ),
    xray_enabled=False
)

Create a new AWS::AppSync::GraphQLApi.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • authentication_type (str) – Security configuration for your GraphQL API. For allowed values (such as API_KEY , AWS_IAM , AMAZON_COGNITO_USER_POOLS , OPENID_CONNECT , or AWS_LAMBDA ), see Security in the AWS AppSync Developer Guide .

  • name (str) – The API name.

  • additional_authentication_providers (Union[IResolvable, Sequence[Union[IResolvable, AdditionalAuthenticationProviderProperty]], None]) – A list of additional authentication providers for the GraphqlApi API.

  • lambda_authorizer_config (Union[IResolvable, LambdaAuthorizerConfigProperty, None]) – A LambdaAuthorizerConfig holds configuration on how to authorize AWS AppSync API access when using the AWS_LAMBDA authorizer mode. Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.

  • log_config (Union[IResolvable, LogConfigProperty, None]) – The Amazon CloudWatch Logs configuration.

  • open_id_connect_config (Union[IResolvable, OpenIDConnectConfigProperty, None]) – The OpenID Connect configuration.

  • tags (Union[IResolvable, Sequence[Union[IResolvable, CfnTag]], None]) – An arbitrary set of tags (key-value pairs) for this GraphQL API.

  • user_pool_config (Union[IResolvable, UserPoolConfigProperty, None]) – Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.

  • xray_enabled (Union[bool, IResolvable, None]) – A flag indicating whether to use AWS X-Ray tracing for this GraphqlApi .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}
Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::AppSync::GraphQLApi'
additional_authentication_providers

A list of additional authentication providers for the GraphqlApi API.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-additionalauthenticationproviders

Return type

Union[IResolvable, List[Union[IResolvable, AdditionalAuthenticationProviderProperty]], None]

attr_api_id

Unique AWS AppSync GraphQL API identifier.

CloudformationAttribute

ApiId

Return type

str

attr_arn

The Amazon Resource Name (ARN) of the API key, such as arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid .

CloudformationAttribute

Arn

Return type

str

attr_graph_ql_url

The Endpoint URL of your GraphQL API.

CloudformationAttribute

GraphQLUrl

Return type

str

authentication_type

Security configuration for your GraphQL API.

For allowed values (such as API_KEY , AWS_IAM , AMAZON_COGNITO_USER_POOLS , OPENID_CONNECT , or AWS_LAMBDA ), see Security in the AWS AppSync Developer Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-authenticationtype

Return type

str

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

lambda_authorizer_config

A LambdaAuthorizerConfig holds configuration on how to authorize AWS AppSync API access when using the AWS_LAMBDA authorizer mode.

Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-lambdaauthorizerconfig

Return type

Union[IResolvable, LambdaAuthorizerConfigProperty, None]

log_config

The Amazon CloudWatch Logs configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-logconfig

Return type

Union[IResolvable, LogConfigProperty, None]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

The API name.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-name

Return type

str

node

The construct tree node associated with this construct.

Return type

ConstructNode

open_id_connect_config

The OpenID Connect configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-openidconnectconfig

Return type

Union[IResolvable, OpenIDConnectConfigProperty, None]

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

tags

An arbitrary set of tags (key-value pairs) for this GraphQL API.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-tags

Return type

TagManager

user_pool_config

Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-userpoolconfig

Return type

Union[IResolvable, UserPoolConfigProperty, None]

xray_enabled

A flag indicating whether to use AWS X-Ray tracing for this GraphqlApi .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-graphqlapi.html#cfn-appsync-graphqlapi-xrayenabled

Return type

Union[bool, IResolvable, None]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

AdditionalAuthenticationProviderProperty

class CfnGraphQLApi.AdditionalAuthenticationProviderProperty(*, authentication_type, lambda_authorizer_config=None, open_id_connect_config=None, user_pool_config=None)

Bases: object

Describes an additional authentication provider.

Parameters
  • authentication_type (str) – The authentication type for API key, AWS Identity and Access Management , OIDC, Amazon Cognito user pools , or AWS Lambda . Valid Values: API_KEY | AWS_IAM | OPENID_CONNECT | AMAZON_COGNITO_USER_POOLS | AWS_LAMBDA

  • lambda_authorizer_config (Union[IResolvable, LambdaAuthorizerConfigProperty, None]) – Configuration for AWS Lambda function authorization.

  • open_id_connect_config (Union[IResolvable, OpenIDConnectConfigProperty, None]) – The OIDC configuration.

  • user_pool_config (Union[IResolvable, CognitoUserPoolConfigProperty, None]) – The Amazon Cognito user pool configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

additional_authentication_provider_property = appsync.CfnGraphQLApi.AdditionalAuthenticationProviderProperty(
    authentication_type="authenticationType",

    # the properties below are optional
    lambda_authorizer_config=appsync.CfnGraphQLApi.LambdaAuthorizerConfigProperty(
        authorizer_result_ttl_in_seconds=123,
        authorizer_uri="authorizerUri",
        identity_validation_expression="identityValidationExpression"
    ),
    open_id_connect_config=appsync.CfnGraphQLApi.OpenIDConnectConfigProperty(
        auth_ttl=123,
        client_id="clientId",
        iat_ttl=123,
        issuer="issuer"
    ),
    user_pool_config=appsync.CfnGraphQLApi.CognitoUserPoolConfigProperty(
        app_id_client_regex="appIdClientRegex",
        aws_region="awsRegion",
        user_pool_id="userPoolId"
    )
)

Attributes

authentication_type

The authentication type for API key, AWS Identity and Access Management , OIDC, Amazon Cognito user pools , or AWS Lambda .

Valid Values: API_KEY | AWS_IAM | OPENID_CONNECT | AMAZON_COGNITO_USER_POOLS | AWS_LAMBDA

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html#cfn-appsync-graphqlapi-additionalauthenticationprovider-authenticationtype

Return type

str

lambda_authorizer_config

Configuration for AWS Lambda function authorization.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html#cfn-appsync-graphqlapi-additionalauthenticationprovider-lambdaauthorizerconfig

Return type

Union[IResolvable, LambdaAuthorizerConfigProperty, None]

open_id_connect_config

The OIDC configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html#cfn-appsync-graphqlapi-additionalauthenticationprovider-openidconnectconfig

Return type

Union[IResolvable, OpenIDConnectConfigProperty, None]

user_pool_config

The Amazon Cognito user pool configuration.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-additionalauthenticationprovider.html#cfn-appsync-graphqlapi-additionalauthenticationprovider-userpoolconfig

Return type

Union[IResolvable, CognitoUserPoolConfigProperty, None]

CognitoUserPoolConfigProperty

class CfnGraphQLApi.CognitoUserPoolConfigProperty(*, app_id_client_regex=None, aws_region=None, user_pool_id=None)

Bases: object

Describes an Amazon Cognito user pool configuration.

Parameters
  • app_id_client_regex (Optional[str]) – A regular expression for validating the incoming Amazon Cognito user pool app client ID.

  • aws_region (Optional[str]) – The AWS Region in which the user pool was created.

  • user_pool_id (Optional[str]) – The user pool ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-cognitouserpoolconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

cognito_user_pool_config_property = appsync.CfnGraphQLApi.CognitoUserPoolConfigProperty(
    app_id_client_regex="appIdClientRegex",
    aws_region="awsRegion",
    user_pool_id="userPoolId"
)

Attributes

app_id_client_regex

A regular expression for validating the incoming Amazon Cognito user pool app client ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-cognitouserpoolconfig.html#cfn-appsync-graphqlapi-cognitouserpoolconfig-appidclientregex

Return type

Optional[str]

aws_region

The AWS Region in which the user pool was created.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-cognitouserpoolconfig.html#cfn-appsync-graphqlapi-cognitouserpoolconfig-awsregion

Return type

Optional[str]

user_pool_id

The user pool ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-cognitouserpoolconfig.html#cfn-appsync-graphqlapi-cognitouserpoolconfig-userpoolid

Return type

Optional[str]

LambdaAuthorizerConfigProperty

class CfnGraphQLApi.LambdaAuthorizerConfigProperty(*, authorizer_result_ttl_in_seconds=None, authorizer_uri=None, identity_validation_expression=None)

Bases: object

Configuration for AWS Lambda function authorization.

Parameters
  • authorizer_result_ttl_in_seconds (Union[int, float, None]) – The number of seconds a response should be cached for. The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

  • authorizer_uri (Optional[str]) – The ARN of the Lambda function to be called for authorization. This may be a standard Lambda ARN, a version ARN ( .../v3 ) or alias ARN. Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To do so with the AWS CLI , run the following: aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

  • identity_validation_expression (Optional[str]) – A regular expression for validation of tokens before the Lambda function is called.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-lambdaauthorizerconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

lambda_authorizer_config_property = appsync.CfnGraphQLApi.LambdaAuthorizerConfigProperty(
    authorizer_result_ttl_in_seconds=123,
    authorizer_uri="authorizerUri",
    identity_validation_expression="identityValidationExpression"
)

Attributes

authorizer_result_ttl_in_seconds

The number of seconds a response should be cached for.

The default is 5 minutes (300 seconds). The Lambda function can override this by returning a ttlOverride key in its response. A value of 0 disables caching of responses.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-lambdaauthorizerconfig.html#cfn-appsync-graphqlapi-lambdaauthorizerconfig-authorizerresultttlinseconds

Return type

Union[int, float, None]

authorizer_uri

The ARN of the Lambda function to be called for authorization.

This may be a standard Lambda ARN, a version ARN ( .../v3 ) or alias ARN.

Note : This Lambda function must have the following resource-based policy assigned to it. When configuring Lambda authorizers in the console, this is done for you. To do so with the AWS CLI , run the following:

aws lambda add-permission --function-name "arn:aws:lambda:us-east-2:111122223333:function:my-function" --statement-id "appsync" --principal appsync.amazonaws.com --action lambda:InvokeFunction

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-lambdaauthorizerconfig.html#cfn-appsync-graphqlapi-lambdaauthorizerconfig-authorizeruri

Return type

Optional[str]

identity_validation_expression

A regular expression for validation of tokens before the Lambda function is called.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-lambdaauthorizerconfig.html#cfn-appsync-graphqlapi-lambdaauthorizerconfig-identityvalidationexpression

Return type

Optional[str]

LogConfigProperty

class CfnGraphQLApi.LogConfigProperty(*, cloud_watch_logs_role_arn=None, exclude_verbose_content=None, field_log_level=None)

Bases: object

The LogConfig property type specifies the logging configuration when writing GraphQL operations and tracing to Amazon CloudWatch for an AWS AppSync GraphQL API.

LogConfig is a property of the AWS::AppSync::GraphQLApi property type.

Parameters
  • cloud_watch_logs_role_arn (Optional[str]) – The service role that AWS AppSync will assume to publish to Amazon CloudWatch Logs in your account.

  • exclude_verbose_content (Union[bool, IResolvable, None]) – Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

  • field_log_level (Optional[str]) – The field logging level. Values can be NONE, ERROR, or ALL. - NONE : No field-level logs are captured. - ERROR : Logs the following information only for the fields that are in error: - The error section in the server response. - Field-level errors. - The generated request/response functions that got resolved for error fields. - ALL : The following information is logged for all fields in the query: - Field-level tracing information. - The generated request/response functions that got resolved for each field.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

log_config_property = appsync.CfnGraphQLApi.LogConfigProperty(
    cloud_watch_logs_role_arn="cloudWatchLogsRoleArn",
    exclude_verbose_content=False,
    field_log_level="fieldLogLevel"
)

Attributes

cloud_watch_logs_role_arn

The service role that AWS AppSync will assume to publish to Amazon CloudWatch Logs in your account.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html#cfn-appsync-graphqlapi-logconfig-cloudwatchlogsrolearn

Return type

Optional[str]

exclude_verbose_content

Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html#cfn-appsync-graphqlapi-logconfig-excludeverbosecontent

Return type

Union[bool, IResolvable, None]

field_log_level

The field logging level. Values can be NONE, ERROR, or ALL.

  • NONE : No field-level logs are captured.

  • ERROR : Logs the following information only for the fields that are in error:

  • The error section in the server response.

  • Field-level errors.

  • The generated request/response functions that got resolved for error fields.

  • ALL : The following information is logged for all fields in the query:

  • Field-level tracing information.

  • The generated request/response functions that got resolved for each field.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-logconfig.html#cfn-appsync-graphqlapi-logconfig-fieldloglevel

Return type

Optional[str]

OpenIDConnectConfigProperty

class CfnGraphQLApi.OpenIDConnectConfigProperty(*, auth_ttl=None, client_id=None, iat_ttl=None, issuer=None)

Bases: object

The OpenIDConnectConfig property type specifies the optional authorization configuration for using an OpenID Connect compliant service with your GraphQL endpoint for an AWS AppSync GraphQL API.

OpenIDConnectConfig is a property of the AWS::AppSync::GraphQLApi property type.

Parameters
  • auth_ttl (Union[int, float, None]) – The number of milliseconds that a token is valid after being authenticated.

  • client_id (Optional[str]) – The client identifier of the Relying party at the OpenID identity provider. This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so that AWS AppSync can validate against multiple client identifiers at a time.

  • iat_ttl (Union[int, float, None]) – The number of milliseconds that a token is valid after it’s issued to a user.

  • issuer (Optional[str]) – The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-openidconnectconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

open_iDConnect_config_property = appsync.CfnGraphQLApi.OpenIDConnectConfigProperty(
    auth_ttl=123,
    client_id="clientId",
    iat_ttl=123,
    issuer="issuer"
)

Attributes

auth_ttl

The number of milliseconds that a token is valid after being authenticated.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-openidconnectconfig.html#cfn-appsync-graphqlapi-openidconnectconfig-authttl

Return type

Union[int, float, None]

client_id

The client identifier of the Relying party at the OpenID identity provider.

This identifier is typically obtained when the Relying party is registered with the OpenID identity provider. You can specify a regular expression so that AWS AppSync can validate against multiple client identifiers at a time.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-openidconnectconfig.html#cfn-appsync-graphqlapi-openidconnectconfig-clientid

Return type

Optional[str]

iat_ttl

The number of milliseconds that a token is valid after it’s issued to a user.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-openidconnectconfig.html#cfn-appsync-graphqlapi-openidconnectconfig-iatttl

Return type

Union[int, float, None]

issuer

The issuer for the OIDC configuration.

The issuer returned by discovery must exactly match the value of iss in the ID token.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-openidconnectconfig.html#cfn-appsync-graphqlapi-openidconnectconfig-issuer

Return type

Optional[str]

UserPoolConfigProperty

class CfnGraphQLApi.UserPoolConfigProperty(*, app_id_client_regex=None, aws_region=None, default_action=None, user_pool_id=None)

Bases: object

The UserPoolConfig property type specifies the optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint for an AWS AppSync GraphQL API.

Parameters
  • app_id_client_regex (Optional[str]) – A regular expression for validating the incoming Amazon Cognito user pool app client ID.

  • aws_region (Optional[str]) – The AWS Region in which the user pool was created.

  • default_action (Optional[str]) – The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn’t match the Amazon Cognito user pool configuration. When specifying Amazon Cognito user pools as the default authentication, you must set the value for DefaultAction to ALLOW if specifying AdditionalAuthenticationProviders .

  • user_pool_id (Optional[str]) – The user pool ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_appsync as appsync

user_pool_config_property = appsync.CfnGraphQLApi.UserPoolConfigProperty(
    app_id_client_regex="appIdClientRegex",
    aws_region="awsRegion",
    default_action="defaultAction",
    user_pool_id="userPoolId"
)

Attributes

app_id_client_regex

A regular expression for validating the incoming Amazon Cognito user pool app client ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-appidclientregex

Return type

Optional[str]

aws_region

The AWS Region in which the user pool was created.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-awsregion

Return type

Optional[str]

default_action

The action that you want your GraphQL API to take when a request that uses Amazon Cognito user pool authentication doesn’t match the Amazon Cognito user pool configuration.

When specifying Amazon Cognito user pools as the default authentication, you must set the value for DefaultAction to ALLOW if specifying AdditionalAuthenticationProviders .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-defaultaction

Return type

Optional[str]

user_pool_id

The user pool ID.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-graphqlapi-userpoolconfig.html#cfn-appsync-graphqlapi-userpoolconfig-userpoolid

Return type

Optional[str]