AWS Tools for Windows PowerShell
Command 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.

Synopsis

Calls the AWS AppSync CreateGraphqlApi API operation.

Syntax

New-ASYNGraphqlApi
-Name <String>
-AdditionalAuthenticationProvider <AdditionalAuthenticationProvider[]>
-AuthenticationType <AuthenticationType>
-LambdaAuthorizerConfig_AuthorizerResultTtlInSecond <Int32>
-LambdaAuthorizerConfig_AuthorizerUri <String>
-OpenIDConnectConfig_AuthTTL <Int64>
-OpenIDConnectConfig_ClientId <String>
-LogConfig_CloudWatchLogsRoleArn <String>
-LogConfig_ExcludeVerboseContent <Boolean>
-LogConfig_FieldLogLevel <FieldLogLevel>
-OpenIDConnectConfig_IatTTL <Int64>
-LambdaAuthorizerConfig_IdentityValidationExpression <String>
-OpenIDConnectConfig_Issuer <String>
-Tag <Hashtable>
-UserPoolConfig <UserPoolConfig>
-XrayEnabled <Boolean>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonAppSyncConfig>

Description

Creates a GraphqlApi object.

Parameters

-AdditionalAuthenticationProvider <AdditionalAuthenticationProvider[]>
A list of additional authentication providers for the GraphqlApi API.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAdditionalAuthenticationProviders
-AuthenticationType <AuthenticationType>
The authentication type: API key, Identity and Access Management (IAM), OpenID Connect (OIDC), Amazon Cognito user pools, or Lambda.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientConfig <AmazonAppSyncConfig>
Amazon.PowerShell.Cmdlets.ASYN.AmazonAppSyncClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LambdaAuthorizerConfig_AuthorizerResultTtlInSecond <Int32>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesLambdaAuthorizerConfig_AuthorizerResultTtlInSeconds
-LambdaAuthorizerConfig_AuthorizerUri <String>
The Amazon Resource Name (ARN) of the Lambda function to be called for authorization. This can be a standard Lambda ARN, a version ARN (.../v3), or an 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 use the Command Line Interface (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
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LambdaAuthorizerConfig_IdentityValidationExpression <String>
A regular expression for validation of tokens before the Lambda function is called.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LogConfig_CloudWatchLogsRoleArn <String>
The service role that AppSync assumes to publish to CloudWatch logs in your account.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LogConfig_ExcludeVerboseContent <Boolean>
Set to TRUE to exclude sections that contain information such as headers, context, and evaluated mapping templates, regardless of logging level.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LogConfig_FieldLogLevel <FieldLogLevel>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Name <String>
A user-supplied name for the GraphqlApi.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-OpenIDConnectConfig_AuthTTL <Int64>
The number of milliseconds that a token is valid after being authenticated.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OpenIDConnectConfig_ClientId <String>
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 AppSync can validate against multiple client identifiers at a time.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OpenIDConnectConfig_IatTTL <Int64>
The number of milliseconds that a token is valid after it's issued to a user.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OpenIDConnectConfig_Issuer <String>
The issuer for the OIDC configuration. The issuer returned by discovery must exactly match the value of iss in the ID token.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the Name parameter. The -PassThru parameter is deprecated, use -Select '^Name' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'GraphqlApi'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.AppSync.Model.CreateGraphqlApiResponse). Specifying the name of a property of type Amazon.AppSync.Model.CreateGraphqlApiResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Hashtable>
A TagMap object.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-UserPoolConfig <UserPoolConfig>
The Amazon Cognito user pool configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-XrayEnabled <Boolean>
A flag indicating whether to use X-Ray tracing for the GraphqlApi.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.AppSync.Model.GraphqlApi object. The service call response (type Amazon.AppSync.Model.CreateGraphqlApiResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z