Class: AWS.AmplifyBackend
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.AmplifyBackend
- Identifier:
- amplifybackend
- API Version:
- 2020-08-11
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
AWS Amplify Admin API
Sending a Request Using AmplifyBackend
var amplifybackend = new AWS.AmplifyBackend();
amplifybackend.cloneBackend(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the AmplifyBackend object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var amplifybackend = new AWS.AmplifyBackend({apiVersion: '2020-08-11'});
You can also set the API version globally in AWS.config.apiVersions
using
the amplifybackend service identifier:
AWS.config.apiVersions = {
amplifybackend: '2020-08-11',
// other service API versions
};
var amplifybackend = new AWS.AmplifyBackend();
Version:
-
2020-08-11
Constructor Summary collapse
-
new AWS.AmplifyBackend(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
cloneBackend(params = {}, callback) ⇒ AWS.Request
This operation clones an existing backend.
.
-
createBackend(params = {}, callback) ⇒ AWS.Request
This operation creates a backend for an Amplify app.
-
createBackendAPI(params = {}, callback) ⇒ AWS.Request
Creates a new backend API resource.
.
-
createBackendAuth(params = {}, callback) ⇒ AWS.Request
Creates a new backend authentication resource.
.
-
createBackendConfig(params = {}, callback) ⇒ AWS.Request
Creates a config object for a backend.
.
-
createBackendStorage(params = {}, callback) ⇒ AWS.Request
Creates a backend storage resource.
.
-
createToken(params = {}, callback) ⇒ AWS.Request
Generates a one-time challenge code to authenticate a user into your Amplify Admin UI.
.
-
deleteBackend(params = {}, callback) ⇒ AWS.Request
Removes an existing environment from your Amplify project.
.
-
deleteBackendAPI(params = {}, callback) ⇒ AWS.Request
Deletes an existing backend API resource.
.
-
deleteBackendAuth(params = {}, callback) ⇒ AWS.Request
Deletes an existing backend authentication resource.
.
-
deleteBackendStorage(params = {}, callback) ⇒ AWS.Request
Removes the specified backend storage resource.
.
-
deleteToken(params = {}, callback) ⇒ AWS.Request
Deletes the challenge token based on the given appId and sessionId.
.
-
generateBackendAPIModels(params = {}, callback) ⇒ AWS.Request
Generates a model schema for an existing backend API resource.
.
-
getBackend(params = {}, callback) ⇒ AWS.Request
Provides project-level details for your Amplify UI project.
.
-
getBackendAPI(params = {}, callback) ⇒ AWS.Request
Gets the details for a backend API.
.
-
getBackendAPIModels(params = {}, callback) ⇒ AWS.Request
Gets a model introspection schema for an existing backend API resource.
.
-
getBackendAuth(params = {}, callback) ⇒ AWS.Request
Gets a backend auth details.
.
-
getBackendJob(params = {}, callback) ⇒ AWS.Request
Returns information about a specific job.
.
-
getBackendStorage(params = {}, callback) ⇒ AWS.Request
Gets details for a backend storage resource.
.
-
getToken(params = {}, callback) ⇒ AWS.Request
Gets the challenge token based on the given appId and sessionId.
.
-
importBackendAuth(params = {}, callback) ⇒ AWS.Request
Imports an existing backend authentication resource.
.
-
importBackendStorage(params = {}, callback) ⇒ AWS.Request
Imports an existing backend storage resource.
.
-
listBackendJobs(params = {}, callback) ⇒ AWS.Request
Lists the jobs for the backend of an Amplify app.
.
-
listS3Buckets(params = {}, callback) ⇒ AWS.Request
The list of S3 buckets in your account.
.
-
removeAllBackends(params = {}, callback) ⇒ AWS.Request
Removes all backend environments from your Amplify project.
.
-
removeBackendConfig(params = {}, callback) ⇒ AWS.Request
Removes the AWS resources required to access the Amplify Admin UI.
.
-
updateBackendAPI(params = {}, callback) ⇒ AWS.Request
Updates an existing backend API resource.
.
-
updateBackendAuth(params = {}, callback) ⇒ AWS.Request
Updates an existing backend authentication resource.
.
-
updateBackendConfig(params = {}, callback) ⇒ AWS.Request
Updates the AWS resources required to access the Amplify Admin UI.
.
-
updateBackendJob(params = {}, callback) ⇒ AWS.Request
Updates a specific job.
.
-
updateBackendStorage(params = {}, callback) ⇒ AWS.Request
Updates an existing backend storage resource.
.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.AmplifyBackend(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Examples:
Constructing a AmplifyBackend object
var amplifybackend = new AWS.AmplifyBackend({apiVersion: '2020-08-11'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String|AWS.Endpoint)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
or an Endpoint object. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.AmplifyBackend.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.AmplifyBackend.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.AmplifyBackend.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
computeChecksums
(Boolean)
—
whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)
-
convertResponseTypes
(Boolean)
—
whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to
true
. -
correctClockSkew
(Boolean)
—
whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to
false
. -
s3ForcePathStyle
(Boolean)
—
whether to force path style URLs for S3 objects.
-
s3BucketEndpoint
(Boolean)
—
whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an
endpoint
to be provided explicitly to the service constructor. -
s3DisableBodySigning
(Boolean)
—
whether S3 body signing should be disabled when using signature version
v4
. Body signing can only be disabled when using https. Defaults totrue
. -
s3UsEast1RegionalEndpoint
('legacy'|'regional')
—
when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to
legacy
-
s3UseArnRegion
(Boolean)
—
whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to
true
-
retryDelayOptions
(map)
—
A set of options to configure the retry delay on retryable errors. Currently supported options are:
- base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
- customBackoff [function] — A custom function that accepts a
retry count and error and returns the amount of time to delay in
milliseconds. If the result is a non-zero negative value, no further
retry attempts will be made. The
base
option will be ignored if this option is supplied. The function is only called for retryable errors.
-
httpOptions
(map)
—
A set of options to pass to the low-level HTTP request. Currently supported options are:
- proxy [String] — the URL to proxy requests through
- agent [http.Agent, https.Agent] — the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (
http.globalAgent
) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment. - connectTimeout [Integer] — Sets the socket to timeout after
failing to establish a connection with the server after
connectTimeout
milliseconds. This timeout has no effect once a socket connection has been established. - timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
- xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
- xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
-
apiVersion
(String, Date)
—
a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by
apiVersions
). Specify 'latest' to use the latest possible version. -
apiVersions
(map<String, String|Date>)
—
a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
-
logger
(#write, #log)
—
an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests
-
systemClockOffset
(Number)
—
an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global
AWS.config
object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds. -
signatureVersion
(String)
—
the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.
-
signatureCache
(Boolean)
—
whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to
true
. -
dynamoDbCrc32
(Boolean)
—
whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default:
true
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean|undefined)
—
whether to call operations with endpoints given by service dynamically. Setting this
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
. -
stsRegionalEndpoints
('legacy'|'regional')
—
whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.
-
useFipsEndpoint
(Boolean)
—
Enables FIPS compatible endpoints. Defaults to
false
. -
useDualstackEndpoint
(Boolean)
—
Enables IPv6 dualstack endpoint. Defaults to
false
.
Property Details
Method Details
cloneBackend(params = {}, callback) ⇒ AWS.Request
This operation clones an existing backend.
Service Reference:
Examples:
Calling the cloneBackend operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
TargetEnvironmentName: 'STRING_VALUE' /* required */
};
amplifybackend.cloneBackend(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
TargetEnvironmentName
— (String
)The name of the destination backend environment to be created.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
createBackend(params = {}, callback) ⇒ AWS.Request
This operation creates a backend for an Amplify app. Backends are automatically created at the time of app creation.
Service Reference:
Examples:
Calling the createBackend operation
var params = {
AppId: 'STRING_VALUE', /* required */
AppName: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceConfig: {
},
ResourceName: 'STRING_VALUE'
};
amplifybackend.createBackend(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
AppName
— (String
)The name of the app.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for creating a backend.
ResourceName
— (String
)The name of the resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
createBackendAPI(params = {}, callback) ⇒ AWS.Request
Creates a new backend API resource.
Service Reference:
Examples:
Calling the createBackendAPI operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceConfig: { /* required */
AdditionalAuthTypes: [
{
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
/* more items */
],
ApiName: 'STRING_VALUE',
ConflictResolution: {
ResolutionStrategy: OPTIMISTIC_CONCURRENCY | LAMBDA | AUTOMERGE | NONE
},
DefaultAuthType: {
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
Service: 'STRING_VALUE',
TransformSchema: 'STRING_VALUE'
},
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.createBackendAPI(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for this request.
AdditionalAuthTypes
— (Array<map>
)Additional authentication methods used to interact with your data models.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
ApiName
— (String
)The API name used to interact with the data model, configured as a part of your Amplify project.
ConflictResolution
— (map
)The conflict resolution strategy for your data stored in the data models.
ResolutionStrategy
— (String
)The strategy for conflict resolution.
Possible values include:"OPTIMISTIC_CONCURRENCY"
"LAMBDA"
"AUTOMERGE"
"NONE"
DefaultAuthType
— (map
)The default authentication type for interacting with the configured data models in your Amplify project.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
Service
— (String
)The service used to provision and interact with the data model.
TransformSchema
— (String
)The definition of the data model in the annotated transform of the GraphQL schema.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
createBackendAuth(params = {}, callback) ⇒ AWS.Request
Creates a new backend authentication resource.
Service Reference:
Examples:
Calling the createBackendAuth operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceConfig: { /* required */
AuthResources: USER_POOL_ONLY | IDENTITY_POOL_AND_USER_POOL, /* required */
Service: COGNITO, /* required */
UserPoolConfigs: { /* required */
RequiredSignUpAttributes: [ /* required */
ADDRESS | BIRTHDATE | EMAIL | FAMILY_NAME | GENDER | GIVEN_NAME | LOCALE | MIDDLE_NAME | NAME | NICKNAME | PHONE_NUMBER | PICTURE | PREFERRED_USERNAME | PROFILE | UPDATED_AT | WEBSITE | ZONE_INFO,
/* more items */
],
SignInMethod: EMAIL | EMAIL_AND_PHONE_NUMBER | PHONE_NUMBER | USERNAME, /* required */
UserPoolName: 'STRING_VALUE', /* required */
ForgotPassword: {
DeliveryMethod: EMAIL | SMS, /* required */
EmailSettings: {
EmailMessage: 'STRING_VALUE',
EmailSubject: 'STRING_VALUE'
},
SmsSettings: {
SmsMessage: 'STRING_VALUE'
}
},
Mfa: {
MFAMode: ON | OFF | OPTIONAL, /* required */
Settings: {
MfaTypes: [
SMS | TOTP,
/* more items */
],
SmsMessage: 'STRING_VALUE'
}
},
OAuth: {
OAuthGrantType: CODE | IMPLICIT, /* required */
OAuthScopes: [ /* required */
PHONE | EMAIL | OPENID | PROFILE | AWS_COGNITO_SIGNIN_USER_ADMIN,
/* more items */
],
RedirectSignInURIs: [ /* required */
'STRING_VALUE',
/* more items */
],
RedirectSignOutURIs: [ /* required */
'STRING_VALUE',
/* more items */
],
DomainPrefix: 'STRING_VALUE',
SocialProviderSettings: {
Facebook: {
ClientId: 'STRING_VALUE',
ClientSecret: 'STRING_VALUE'
},
Google: {
ClientId: 'STRING_VALUE',
ClientSecret: 'STRING_VALUE'
},
LoginWithAmazon: {
ClientId: 'STRING_VALUE',
ClientSecret: 'STRING_VALUE'
},
SignInWithApple: {
ClientId: 'STRING_VALUE',
KeyId: 'STRING_VALUE',
PrivateKey: 'STRING_VALUE',
TeamId: 'STRING_VALUE'
}
}
},
PasswordPolicy: {
MinimumLength: 'NUMBER_VALUE', /* required */
AdditionalConstraints: [
REQUIRE_DIGIT | REQUIRE_LOWERCASE | REQUIRE_SYMBOL | REQUIRE_UPPERCASE,
/* more items */
]
},
VerificationMessage: {
DeliveryMethod: EMAIL | SMS, /* required */
EmailSettings: {
EmailMessage: 'STRING_VALUE',
EmailSubject: 'STRING_VALUE'
},
SmsSettings: {
SmsMessage: 'STRING_VALUE'
}
}
},
IdentityPoolConfigs: {
IdentityPoolName: 'STRING_VALUE', /* required */
UnauthenticatedLogin: true || false /* required */
}
},
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.createBackendAuth(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for this request object.
AuthResources
— required — (String
)Defines whether you want to configure only authentication or both authentication and authorization settings.
Possible values include:"USER_POOL_ONLY"
"IDENTITY_POOL_AND_USER_POOL"
IdentityPoolConfigs
— (map
)Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
IdentityPoolName
— required — (String
)Name of the Amazon Cognito identity pool used for authorization.
UnauthenticatedLogin
— required — (Boolean
)Set to true or false based on whether you want to enable guest authorization to your Amplify app.
Service
— required — (String
)Defines the service name to use when configuring an authentication resource in your Amplify project.
Possible values include:"COGNITO"
UserPoolConfigs
— required — (map
)Describes authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.
ForgotPassword
— (map
)(DEPRECATED) Describes the forgotten password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
DeliveryMethod
— required — (String
)(DEPRECATED) Describes which mode to use (either SMS or email) to deliver messages to app users who want to recover their password.
Possible values include:"EMAIL"
"SMS"
EmailSettings
— (map
)(DEPRECATED) The configuration for the email sent when an app user forgets their password.
EmailMessage
— (String
)The contents of the email message.
EmailSubject
— (String
)The contents of the subject line of the email message.
SmsSettings
— (map
)(DEPRECATED) The configuration for the SMS message sent when an app user forgets their password.
SmsMessage
— (String
)The contents of the SMS message.
Mfa
— (map
)Describes whether to apply multi-factor authentication policies for your Amazon Cognito user pool configured as a part of your Amplify project.
MFAMode
— required — (String
)Describes whether MFA should be [ON, OFF, or OPTIONAL] for authentication in your Amplify project.
Possible values include:"ON"
"OFF"
"OPTIONAL"
Settings
— (map
)Describes the configuration settings and methods for your Amplify app users to use MFA.
MfaTypes
— (Array<String>
)The supported MFA types.
SmsMessage
— (String
)The body of the SMS message.
OAuth
— (map
)Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
DomainPrefix
— (String
)The domain prefix for your Amplify app.
OAuthGrantType
— required — (String
)The OAuth grant type that you use to allow app users to authenticate from your Amplify app.
Possible values include:"CODE"
"IMPLICIT"
OAuthScopes
— required — (Array<String>
)List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.
RedirectSignInURIs
— required — (Array<String>
)The redirected URI for signing in to your Amplify app.
RedirectSignOutURIs
— required — (Array<String>
)Redirect URLs that OAuth uses when a user signs out of an Amplify app.
SocialProviderSettings
— (map
)The settings for using social providers to access your Amplify app.
Facebook
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
Google
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
LoginWithAmazon
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
SignInWithApple
— (map
)Describes Apple social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id (also called Services ID) that comes from Apple.
KeyId
— (String
)Describes the key_id that comes from Apple.
PrivateKey
— (String
)Describes the private_key that comes from Apple.
TeamId
— (String
)Describes the team_id that comes from Apple.
PasswordPolicy
— (map
)Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
AdditionalConstraints
— (Array<String>
)Additional constraints for the password used to access the backend of your Amplify project.
MinimumLength
— required — (Float
)The minimum length of the password used to access the backend of your Amplify project.
RequiredSignUpAttributes
— required — (Array<String>
)The required attributes to sign up new users in the user pool.
SignInMethod
— required — (String
)Describes the sign-in methods that your Amplify app users use to log in using the Amazon Cognito user pool, configured as a part of your Amplify project.
Possible values include:"EMAIL"
"EMAIL_AND_PHONE_NUMBER"
"PHONE_NUMBER"
"USERNAME"
UserPoolName
— required — (String
)The Amazon Cognito user pool name.
VerificationMessage
— (map
)Describes the email or SMS verification message for your Amazon Cognito user pool, configured as a part of your Amplify project.
DeliveryMethod
— required — (String
)The type of verification message to send.
Possible values include:"EMAIL"
"SMS"
EmailSettings
— (map
)The settings for the email message.
EmailMessage
— (String
)The contents of the email message.
EmailSubject
— (String
)The contents of the subject line of the email message.
SmsSettings
— (map
)The settings for the SMS message.
SmsMessage
— (String
)The contents of the SMS message.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
createBackendConfig(params = {}, callback) ⇒ AWS.Request
Creates a config object for a backend.
Service Reference:
Examples:
Calling the createBackendConfig operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendManagerAppId: 'STRING_VALUE'
};
amplifybackend.createBackendConfig(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendManagerAppId
— (String
)The app ID for the backend manager.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
createBackendStorage(params = {}, callback) ⇒ AWS.Request
Creates a backend storage resource.
Service Reference:
Examples:
Calling the createBackendStorage operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceConfig: { /* required */
Permissions: { /* required */
Authenticated: [ /* required */
READ | CREATE_AND_UPDATE | DELETE,
/* more items */
],
UnAuthenticated: [
READ | CREATE_AND_UPDATE | DELETE,
/* more items */
]
},
ServiceName: S3, /* required */
BucketName: 'STRING_VALUE'
},
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.createBackendStorage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for creating backend storage.
BucketName
— (String
)The name of the S3 bucket.
Permissions
— required — (map
)The authorization configuration for the storage S3 bucket.
Authenticated
— required — (Array<String>
)Lists all authenticated user read, write, and delete permissions for your S3 bucket.
UnAuthenticated
— (Array<String>
)Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.
ServiceName
— required — (String
)The name of the storage service.
Possible values include:"S3"
ResourceName
— (String
)The name of the storage resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
createToken(params = {}, callback) ⇒ AWS.Request
Generates a one-time challenge code to authenticate a user into your Amplify Admin UI.
Service Reference:
Examples:
Calling the createToken operation
var params = {
AppId: 'STRING_VALUE' /* required */
};
amplifybackend.createToken(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
ChallengeCode
— (String
)One-time challenge code for authenticating into the Amplify Admin UI.
SessionId
— (String
)A unique ID provided when creating a new challenge token.
Ttl
— (String
)The expiry time for the one-time generated token code.
-
(AWS.Response)
—
Returns:
deleteBackend(params = {}, callback) ⇒ AWS.Request
Removes an existing environment from your Amplify project.
Service Reference:
Examples:
Calling the deleteBackend operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE' /* required */
};
amplifybackend.deleteBackend(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
deleteBackendAPI(params = {}, callback) ⇒ AWS.Request
Deletes an existing backend API resource.
Service Reference:
Examples:
Calling the deleteBackendAPI operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE', /* required */
ResourceConfig: {
AdditionalAuthTypes: [
{
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
/* more items */
],
ApiName: 'STRING_VALUE',
ConflictResolution: {
ResolutionStrategy: OPTIMISTIC_CONCURRENCY | LAMBDA | AUTOMERGE | NONE
},
DefaultAuthType: {
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
Service: 'STRING_VALUE',
TransformSchema: 'STRING_VALUE'
}
};
amplifybackend.deleteBackendAPI(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)Defines the resource configuration for the data model in your Amplify project.
AdditionalAuthTypes
— (Array<map>
)Additional authentication methods used to interact with your data models.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
ApiName
— (String
)The API name used to interact with the data model, configured as a part of your Amplify project.
ConflictResolution
— (map
)The conflict resolution strategy for your data stored in the data models.
ResolutionStrategy
— (String
)The strategy for conflict resolution.
Possible values include:"OPTIMISTIC_CONCURRENCY"
"LAMBDA"
"AUTOMERGE"
"NONE"
DefaultAuthType
— (map
)The default authentication type for interacting with the configured data models in your Amplify project.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
Service
— (String
)The service used to provision and interact with the data model.
TransformSchema
— (String
)The definition of the data model in the annotated transform of the GraphQL schema.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
deleteBackendAuth(params = {}, callback) ⇒ AWS.Request
Deletes an existing backend authentication resource.
Service Reference:
Examples:
Calling the deleteBackendAuth operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.deleteBackendAuth(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
deleteBackendStorage(params = {}, callback) ⇒ AWS.Request
Removes the specified backend storage resource.
Service Reference:
Examples:
Calling the deleteBackendStorage operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE', /* required */
ServiceName: S3 /* required */
};
amplifybackend.deleteBackendStorage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceName
— (String
)The name of the storage resource.
ServiceName
— (String
)The name of the storage service.
Possible values include:"S3"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
deleteToken(params = {}, callback) ⇒ AWS.Request
Deletes the challenge token based on the given appId and sessionId.
Service Reference:
Examples:
Calling the deleteToken operation
var params = {
AppId: 'STRING_VALUE', /* required */
SessionId: 'STRING_VALUE' /* required */
};
amplifybackend.deleteToken(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
SessionId
— (String
)The session ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:IsSuccess
— (Boolean
)Indicates whether the request succeeded or failed.
-
(AWS.Response)
—
Returns:
generateBackendAPIModels(params = {}, callback) ⇒ AWS.Request
Generates a model schema for an existing backend API resource.
Service Reference:
Examples:
Calling the generateBackendAPIModels operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.generateBackendAPIModels(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
getBackend(params = {}, callback) ⇒ AWS.Request
Provides project-level details for your Amplify UI project.
Service Reference:
Examples:
Calling the getBackend operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE'
};
amplifybackend.getBackend(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AmplifyFeatureFlags
— (String
)A stringified version of the cli.json file for your Amplify project.
AmplifyMetaConfig
— (String
)A stringified version of the current configs for your Amplify project.
AppId
— (String
)The app ID.
AppName
— (String
)The name of the app.
BackendEnvironmentList
— (Array<String>
)A list of backend environments in an array.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request failed, this is the returned error.
-
(AWS.Response)
—
Returns:
getBackendAPI(params = {}, callback) ⇒ AWS.Request
Gets the details for a backend API.
Service Reference:
Examples:
Calling the getBackendAPI operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE', /* required */
ResourceConfig: {
AdditionalAuthTypes: [
{
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
/* more items */
],
ApiName: 'STRING_VALUE',
ConflictResolution: {
ResolutionStrategy: OPTIMISTIC_CONCURRENCY | LAMBDA | AUTOMERGE | NONE
},
DefaultAuthType: {
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
Service: 'STRING_VALUE',
TransformSchema: 'STRING_VALUE'
}
};
amplifybackend.getBackendAPI(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)Defines the resource configuration for the data model in your Amplify project.
AdditionalAuthTypes
— (Array<map>
)Additional authentication methods used to interact with your data models.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
ApiName
— (String
)The API name used to interact with the data model, configured as a part of your Amplify project.
ConflictResolution
— (map
)The conflict resolution strategy for your data stored in the data models.
ResolutionStrategy
— (String
)The strategy for conflict resolution.
Possible values include:"OPTIMISTIC_CONCURRENCY"
"LAMBDA"
"AUTOMERGE"
"NONE"
DefaultAuthType
— (map
)The default authentication type for interacting with the configured data models in your Amplify project.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
Service
— (String
)The service used to provision and interact with the data model.
TransformSchema
— (String
)The definition of the data model in the annotated transform of the GraphQL schema.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
ResourceConfig
— (map
)The resource configuration for this response object.
AdditionalAuthTypes
— (Array<map>
)Additional authentication methods used to interact with your data models.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
ApiName
— (String
)The API name used to interact with the data model, configured as a part of your Amplify project.
ConflictResolution
— (map
)The conflict resolution strategy for your data stored in the data models.
ResolutionStrategy
— (String
)The strategy for conflict resolution.
Possible values include:"OPTIMISTIC_CONCURRENCY"
"LAMBDA"
"AUTOMERGE"
"NONE"
DefaultAuthType
— (map
)The default authentication type for interacting with the configured data models in your Amplify project.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
Service
— (String
)The service used to provision and interact with the data model.
TransformSchema
— (String
)The definition of the data model in the annotated transform of the GraphQL schema.
ResourceName
— (String
)The name of this resource.
-
(AWS.Response)
—
Returns:
getBackendAPIModels(params = {}, callback) ⇒ AWS.Request
Gets a model introspection schema for an existing backend API resource.
Service Reference:
Examples:
Calling the getBackendAPIModels operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.getBackendAPIModels(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Models
— (String
)Stringified JSON of the datastore model.
Status
— (String
)The current status of the request.
Possible values include:"LATEST"
"STALE"
ModelIntrospectionSchema
— (String
)Stringified JSON of the model introspection schema for an existing backend API resource.
-
(AWS.Response)
—
Returns:
getBackendAuth(params = {}, callback) ⇒ AWS.Request
Gets a backend auth details.
Service Reference:
Examples:
Calling the getBackendAuth operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.getBackendAuth(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
ResourceConfig
— (map
)The resource configuration for authorization requests to the backend of your Amplify project.
AuthResources
— required — (String
)Defines whether you want to configure only authentication or both authentication and authorization settings.
Possible values include:"USER_POOL_ONLY"
"IDENTITY_POOL_AND_USER_POOL"
IdentityPoolConfigs
— (map
)Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
IdentityPoolName
— required — (String
)Name of the Amazon Cognito identity pool used for authorization.
UnauthenticatedLogin
— required — (Boolean
)Set to true or false based on whether you want to enable guest authorization to your Amplify app.
Service
— required — (String
)Defines the service name to use when configuring an authentication resource in your Amplify project.
Possible values include:"COGNITO"
UserPoolConfigs
— required — (map
)Describes authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.
ForgotPassword
— (map
)(DEPRECATED) Describes the forgotten password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
DeliveryMethod
— required — (String
)(DEPRECATED) Describes which mode to use (either SMS or email) to deliver messages to app users who want to recover their password.
Possible values include:"EMAIL"
"SMS"
EmailSettings
— (map
)(DEPRECATED) The configuration for the email sent when an app user forgets their password.
EmailMessage
— (String
)The contents of the email message.
EmailSubject
— (String
)The contents of the subject line of the email message.
SmsSettings
— (map
)(DEPRECATED) The configuration for the SMS message sent when an app user forgets their password.
SmsMessage
— (String
)The contents of the SMS message.
Mfa
— (map
)Describes whether to apply multi-factor authentication policies for your Amazon Cognito user pool configured as a part of your Amplify project.
MFAMode
— required — (String
)Describes whether MFA should be [ON, OFF, or OPTIONAL] for authentication in your Amplify project.
Possible values include:"ON"
"OFF"
"OPTIONAL"
Settings
— (map
)Describes the configuration settings and methods for your Amplify app users to use MFA.
MfaTypes
— (Array<String>
)The supported MFA types.
SmsMessage
— (String
)The body of the SMS message.
OAuth
— (map
)Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
DomainPrefix
— (String
)The domain prefix for your Amplify app.
OAuthGrantType
— required — (String
)The OAuth grant type that you use to allow app users to authenticate from your Amplify app.
Possible values include:"CODE"
"IMPLICIT"
OAuthScopes
— required — (Array<String>
)List of OAuth-related flows used to allow your app users to authenticate from your Amplify app.
RedirectSignInURIs
— required — (Array<String>
)The redirected URI for signing in to your Amplify app.
RedirectSignOutURIs
— required — (Array<String>
)Redirect URLs that OAuth uses when a user signs out of an Amplify app.
SocialProviderSettings
— (map
)The settings for using social providers to access your Amplify app.
Facebook
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
Google
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
LoginWithAmazon
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
SignInWithApple
— (map
)Describes Apple social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id (also called Services ID) that comes from Apple.
KeyId
— (String
)Describes the key_id that comes from Apple.
PrivateKey
— (String
)Describes the private_key that comes from Apple.
TeamId
— (String
)Describes the team_id that comes from Apple.
PasswordPolicy
— (map
)Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
AdditionalConstraints
— (Array<String>
)Additional constraints for the password used to access the backend of your Amplify project.
MinimumLength
— required — (Float
)The minimum length of the password used to access the backend of your Amplify project.
RequiredSignUpAttributes
— required — (Array<String>
)The required attributes to sign up new users in the user pool.
SignInMethod
— required — (String
)Describes the sign-in methods that your Amplify app users use to log in using the Amazon Cognito user pool, configured as a part of your Amplify project.
Possible values include:"EMAIL"
"EMAIL_AND_PHONE_NUMBER"
"PHONE_NUMBER"
"USERNAME"
UserPoolName
— required — (String
)The Amazon Cognito user pool name.
VerificationMessage
— (map
)Describes the email or SMS verification message for your Amazon Cognito user pool, configured as a part of your Amplify project.
DeliveryMethod
— required — (String
)The type of verification message to send.
Possible values include:"EMAIL"
"SMS"
EmailSettings
— (map
)The settings for the email message.
EmailMessage
— (String
)The contents of the email message.
EmailSubject
— (String
)The contents of the subject line of the email message.
SmsSettings
— (map
)The settings for the SMS message.
SmsMessage
— (String
)The contents of the SMS message.
ResourceName
— (String
)The name of this resource.
-
(AWS.Response)
—
Returns:
getBackendJob(params = {}, callback) ⇒ AWS.Request
Returns information about a specific job.
Service Reference:
Examples:
Calling the getBackendJob operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
JobId: 'STRING_VALUE' /* required */
};
amplifybackend.getBackendJob(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
CreateTime
— (String
)The time when the job was created.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
UpdateTime
— (String
)The time when the job was last updated.
-
(AWS.Response)
—
Returns:
getBackendStorage(params = {}, callback) ⇒ AWS.Request
Gets details for a backend storage resource.
Service Reference:
Examples:
Calling the getBackendStorage operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.getBackendStorage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceName
— (String
)The name of the storage resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for the backend storage resource.
BucketName
— (String
)The name of the S3 bucket.
Imported
— required — (Boolean
)Returns True if the storage resource has been imported.
Permissions
— (map
)The authorization configuration for the storage S3 bucket.
Authenticated
— required — (Array<String>
)Lists all authenticated user read, write, and delete permissions for your S3 bucket.
UnAuthenticated
— (Array<String>
)Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.
ServiceName
— required — (String
)The name of the storage service.
Possible values include:"S3"
ResourceName
— (String
)The name of the storage resource.
-
(AWS.Response)
—
Returns:
getToken(params = {}, callback) ⇒ AWS.Request
Gets the challenge token based on the given appId and sessionId.
Service Reference:
Examples:
Calling the getToken operation
var params = {
AppId: 'STRING_VALUE', /* required */
SessionId: 'STRING_VALUE' /* required */
};
amplifybackend.getToken(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
SessionId
— (String
)The session ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
ChallengeCode
— (String
)The one-time challenge code for authenticating into the Amplify Admin UI.
SessionId
— (String
)A unique ID provided when creating a new challenge token.
Ttl
— (String
)The expiry time for the one-time generated token code.
-
(AWS.Response)
—
Returns:
importBackendAuth(params = {}, callback) ⇒ AWS.Request
Imports an existing backend authentication resource.
Service Reference:
Examples:
Calling the importBackendAuth operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
NativeClientId: 'STRING_VALUE', /* required */
UserPoolId: 'STRING_VALUE', /* required */
WebClientId: 'STRING_VALUE', /* required */
IdentityPoolId: 'STRING_VALUE'
};
amplifybackend.importBackendAuth(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
IdentityPoolId
— (String
)The ID of the Amazon Cognito identity pool.
NativeClientId
— (String
)The ID of the Amazon Cognito native client.
UserPoolId
— (String
)The ID of the Amazon Cognito user pool.
WebClientId
— (String
)The ID of the Amazon Cognito web client.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
importBackendStorage(params = {}, callback) ⇒ AWS.Request
Imports an existing backend storage resource.
Service Reference:
Examples:
Calling the importBackendStorage operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ServiceName: S3, /* required */
BucketName: 'STRING_VALUE'
};
amplifybackend.importBackendStorage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
BucketName
— (String
)The name of the S3 bucket.
ServiceName
— (String
)The name of the storage service.
Possible values include:"S3"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
listBackendJobs(params = {}, callback) ⇒ AWS.Request
Lists the jobs for the backend of an Amplify app.
Service Reference:
Examples:
Calling the listBackendJobs operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
JobId: 'STRING_VALUE',
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
Operation: 'STRING_VALUE',
Status: 'STRING_VALUE'
};
amplifybackend.listBackendJobs(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
MaxResults
— (Integer
)The maximum number of results that you want in the response.
NextToken
— (String
)The token for the next set of results.
Operation
— (String
)Filters the list of response objects to include only those with the specified operation name.
Status
— (String
)Filters the list of response objects to include only those with the specified status.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Jobs
— (Array<map>
)An array of jobs and their properties.
AppId
— required — (String
)The app ID.
BackendEnvironmentName
— required — (String
)The name of the backend environment.
CreateTime
— (String
)The time when the job was created.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
UpdateTime
— (String
)The time when the job was last updated.
NextToken
— (String
)The token for the next set of results.
-
(AWS.Response)
—
Returns:
listS3Buckets(params = {}, callback) ⇒ AWS.Request
The list of S3 buckets in your account.
Service Reference:
Examples:
Calling the listS3Buckets operation
var params = {
NextToken: 'STRING_VALUE'
};
amplifybackend.listS3Buckets(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)Reserved for future use.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Buckets
— (Array<map>
)The list of S3 buckets.
CreationDate
— (String
)The creation date of the S3 bucket.
Name
— (String
)The name of the S3 bucket.
NextToken
— (String
)Reserved for future use.
-
(AWS.Response)
—
Returns:
removeAllBackends(params = {}, callback) ⇒ AWS.Request
Removes all backend environments from your Amplify project.
Service Reference:
Examples:
Calling the removeAllBackends operation
var params = {
AppId: 'STRING_VALUE', /* required */
CleanAmplifyApp: true || false
};
amplifybackend.removeAllBackends(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
CleanAmplifyApp
— (Boolean
)Cleans up the Amplify Console app if this value is set to true.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
removeBackendConfig(params = {}, callback) ⇒ AWS.Request
Removes the AWS resources required to access the Amplify Admin UI.
Service Reference:
Examples:
Calling the removeBackendConfig operation
var params = {
AppId: 'STRING_VALUE' /* required */
};
amplifybackend.removeBackendConfig(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Error
— (String
)If the request fails, this error is returned.
-
(AWS.Response)
—
Returns:
updateBackendAPI(params = {}, callback) ⇒ AWS.Request
Updates an existing backend API resource.
Service Reference:
Examples:
Calling the updateBackendAPI operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceName: 'STRING_VALUE', /* required */
ResourceConfig: {
AdditionalAuthTypes: [
{
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
/* more items */
],
ApiName: 'STRING_VALUE',
ConflictResolution: {
ResolutionStrategy: OPTIMISTIC_CONCURRENCY | LAMBDA | AUTOMERGE | NONE
},
DefaultAuthType: {
Mode: API_KEY | AWS_IAM | AMAZON_COGNITO_USER_POOLS | OPENID_CONNECT,
Settings: {
CognitoUserPoolId: 'STRING_VALUE',
Description: 'STRING_VALUE',
ExpirationTime: 'NUMBER_VALUE',
OpenIDAuthTTL: 'STRING_VALUE',
OpenIDClientId: 'STRING_VALUE',
OpenIDIatTTL: 'STRING_VALUE',
OpenIDIssueURL: 'STRING_VALUE',
OpenIDProviderName: 'STRING_VALUE'
}
},
Service: 'STRING_VALUE',
TransformSchema: 'STRING_VALUE'
}
};
amplifybackend.updateBackendAPI(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)Defines the resource configuration for the data model in your Amplify project.
AdditionalAuthTypes
— (Array<map>
)Additional authentication methods used to interact with your data models.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
ApiName
— (String
)The API name used to interact with the data model, configured as a part of your Amplify project.
ConflictResolution
— (map
)The conflict resolution strategy for your data stored in the data models.
ResolutionStrategy
— (String
)The strategy for conflict resolution.
Possible values include:"OPTIMISTIC_CONCURRENCY"
"LAMBDA"
"AUTOMERGE"
"NONE"
DefaultAuthType
— (map
)The default authentication type for interacting with the configured data models in your Amplify project.
Mode
— (String
)Describes the authentication mode.
Possible values include:"API_KEY"
"AWS_IAM"
"AMAZON_COGNITO_USER_POOLS"
"OPENID_CONNECT"
Settings
— (map
)Describes settings for the authentication mode.
CognitoUserPoolId
— (String
)The Amazon Cognito user pool ID, if Amazon Cognito was used as an authentication setting to access your data models.
Description
— (String
)The API key description for API_KEY, if it was used as an authentication mechanism to access your data models.
ExpirationTime
— (Float
)The API key expiration time for API_KEY, if it was used as an authentication mechanism to access your data models.
OpenIDAuthTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDClientId
— (String
)The clientID for openID, if openID was used as an authentication setting to access your data models.
OpenIDIatTTL
— (String
)The expiry time for the OpenID authentication mechanism.
OpenIDIssueURL
— (String
)The openID issuer URL, if openID was used as an authentication setting to access your data models.
OpenIDProviderName
— (String
)The OpenID provider name, if OpenID was used as an authentication mechanism to access your data models.
Service
— (String
)The service used to provision and interact with the data model.
TransformSchema
— (String
)The definition of the data model in the annotated transform of the GraphQL schema.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
updateBackendAuth(params = {}, callback) ⇒ AWS.Request
Updates an existing backend authentication resource.
Service Reference:
Examples:
Calling the updateBackendAuth operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceConfig: { /* required */
AuthResources: USER_POOL_ONLY | IDENTITY_POOL_AND_USER_POOL, /* required */
Service: COGNITO, /* required */
UserPoolConfigs: { /* required */
ForgotPassword: {
DeliveryMethod: EMAIL | SMS,
EmailSettings: {
EmailMessage: 'STRING_VALUE',
EmailSubject: 'STRING_VALUE'
},
SmsSettings: {
SmsMessage: 'STRING_VALUE'
}
},
Mfa: {
MFAMode: ON | OFF | OPTIONAL,
Settings: {
MfaTypes: [
SMS | TOTP,
/* more items */
],
SmsMessage: 'STRING_VALUE'
}
},
OAuth: {
DomainPrefix: 'STRING_VALUE',
OAuthGrantType: CODE | IMPLICIT,
OAuthScopes: [
PHONE | EMAIL | OPENID | PROFILE | AWS_COGNITO_SIGNIN_USER_ADMIN,
/* more items */
],
RedirectSignInURIs: [
'STRING_VALUE',
/* more items */
],
RedirectSignOutURIs: [
'STRING_VALUE',
/* more items */
],
SocialProviderSettings: {
Facebook: {
ClientId: 'STRING_VALUE',
ClientSecret: 'STRING_VALUE'
},
Google: {
ClientId: 'STRING_VALUE',
ClientSecret: 'STRING_VALUE'
},
LoginWithAmazon: {
ClientId: 'STRING_VALUE',
ClientSecret: 'STRING_VALUE'
},
SignInWithApple: {
ClientId: 'STRING_VALUE',
KeyId: 'STRING_VALUE',
PrivateKey: 'STRING_VALUE',
TeamId: 'STRING_VALUE'
}
}
},
PasswordPolicy: {
AdditionalConstraints: [
REQUIRE_DIGIT | REQUIRE_LOWERCASE | REQUIRE_SYMBOL | REQUIRE_UPPERCASE,
/* more items */
],
MinimumLength: 'NUMBER_VALUE'
},
VerificationMessage: {
DeliveryMethod: EMAIL | SMS, /* required */
EmailSettings: {
EmailMessage: 'STRING_VALUE',
EmailSubject: 'STRING_VALUE'
},
SmsSettings: {
SmsMessage: 'STRING_VALUE'
}
}
},
IdentityPoolConfigs: {
UnauthenticatedLogin: true || false
}
},
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.updateBackendAuth(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for this request object.
AuthResources
— required — (String
)Defines the service name to use when configuring an authentication resource in your Amplify project.
Possible values include:"USER_POOL_ONLY"
"IDENTITY_POOL_AND_USER_POOL"
IdentityPoolConfigs
— (map
)Describes the authorization configuration for the Amazon Cognito identity pool, provisioned as a part of your auth resource in the Amplify project.
UnauthenticatedLogin
— (Boolean
)A boolean value that can be set to allow or disallow guest-level authorization into your Amplify app.
Service
— required — (String
)Defines the service name to use when configuring an authentication resource in your Amplify project.
Possible values include:"COGNITO"
UserPoolConfigs
— required — (map
)Describes the authentication configuration for the Amazon Cognito user pool, provisioned as a part of your auth resource in the Amplify project.
ForgotPassword
— (map
)(DEPRECATED) Describes the forgot password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
DeliveryMethod
— (String
)(DEPRECATED) Describes which mode to use (either SMS or email) to deliver messages to app users that want to recover their password.
Possible values include:"EMAIL"
"SMS"
EmailSettings
— (map
)(DEPRECATED) The configuration for the email sent when an app user forgets their password.
EmailMessage
— (String
)The contents of the email message.
EmailSubject
— (String
)The contents of the subject line of the email message.
SmsSettings
— (map
)(DEPRECATED) The configuration for the SMS message sent when an Amplify app user forgets their password.
SmsMessage
— (String
)The contents of the SMS message.
Mfa
— (map
)Describes whether to apply multi-factor authentication policies for your Amazon Cognito user pool configured as a part of your Amplify project.
MFAMode
— (String
)The MFA mode for the backend of your Amplify project.
Possible values include:"ON"
"OFF"
"OPTIONAL"
Settings
— (map
)The settings of your MFA configuration for the backend of your Amplify project.
MfaTypes
— (Array<String>
)The supported MFA types.
SmsMessage
— (String
)The body of the SMS message.
OAuth
— (map
)Describes the OAuth policy and rules for your Amazon Cognito user pool, configured as a part of your Amplify project.
DomainPrefix
— (String
)The Amazon Cognito domain prefix used to create a hosted UI for authentication.
OAuthGrantType
— (String
)The OAuth grant type to allow app users to authenticate from your Amplify app.
Possible values include:"CODE"
"IMPLICIT"
OAuthScopes
— (Array<String>
)The list of OAuth-related flows that can allow users to authenticate from your Amplify app.
RedirectSignInURIs
— (Array<String>
)Redirect URLs that OAuth uses when a user signs in to an Amplify app.
RedirectSignOutURIs
— (Array<String>
)Redirect URLs that OAuth uses when a user signs out of an Amplify app.
SocialProviderSettings
— (map
)Describes third-party social federation configurations for allowing your users to sign in with OAuth.
Facebook
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
Google
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
LoginWithAmazon
— (map
)Describes third-party social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id, which can be obtained from the third-party social federation provider.
ClientSecret
— (String
)Describes the client_secret, which can be obtained from third-party social federation providers.
SignInWithApple
— (map
)Describes Apple social federation configurations for allowing your app users to sign in using OAuth.
ClientId
— (String
)Describes the client_id (also called Services ID) that comes from Apple.
KeyId
— (String
)Describes the key_id that comes from Apple.
PrivateKey
— (String
)Describes the private_key that comes from Apple.
TeamId
— (String
)Describes the team_id that comes from Apple.
PasswordPolicy
— (map
)Describes the password policy for your Amazon Cognito user pool, configured as a part of your Amplify project.
AdditionalConstraints
— (Array<String>
)Describes additional constraints on password requirements to sign in to the auth resource, configured as a part of your Amplify project.
MinimumLength
— (Float
)Describes the minimum length of the password required to sign in to the auth resource, configured as a part of your Amplify project.
VerificationMessage
— (map
)Describes the email or SMS verification message for your Amazon Cognito user pool, configured as a part of your Amplify project.
DeliveryMethod
— required — (String
)The type of verification message to send.
Possible values include:"EMAIL"
"SMS"
EmailSettings
— (map
)The settings for the email message.
EmailMessage
— (String
)The contents of the email message.
EmailSubject
— (String
)The contents of the subject line of the email message.
SmsSettings
— (map
)The settings for the SMS message.
SmsMessage
— (String
)The contents of the SMS message.
ResourceName
— (String
)The name of this resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns:
updateBackendConfig(params = {}, callback) ⇒ AWS.Request
Updates the AWS resources required to access the Amplify Admin UI.
Service Reference:
Examples:
Calling the updateBackendConfig operation
var params = {
AppId: 'STRING_VALUE', /* required */
LoginAuthConfig: {
AwsCognitoIdentityPoolId: 'STRING_VALUE',
AwsCognitoRegion: 'STRING_VALUE',
AwsUserPoolsId: 'STRING_VALUE',
AwsUserPoolsWebClientId: 'STRING_VALUE'
}
};
amplifybackend.updateBackendConfig(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
LoginAuthConfig
— (map
)Describes the Amazon Cognito configuration for Admin UI access.
AwsCognitoIdentityPoolId
— (String
)The Amazon Cognito identity pool ID used for the Amplify Admin UI login authorization.
AwsCognitoRegion
— (String
)The AWS Region for the Amplify Admin UI login.
AwsUserPoolsId
— (String
)The Amazon Cognito user pool ID used for Amplify Admin UI login authentication.
AwsUserPoolsWebClientId
— (String
)The web client ID for the Amazon Cognito user pools.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendManagerAppId
— (String
)The app ID for the backend manager.
Error
— (String
)If the request fails, this error is returned.
LoginAuthConfig
— (map
)Describes the Amazon Cognito configurations for the Admin UI auth resource to log in with.
AwsCognitoIdentityPoolId
— (String
)The Amazon Cognito identity pool ID used for the Amplify Admin UI login authorization.
AwsCognitoRegion
— (String
)The AWS Region for the Amplify Admin UI login.
AwsUserPoolsId
— (String
)The Amazon Cognito user pool ID used for Amplify Admin UI login authentication.
AwsUserPoolsWebClientId
— (String
)The web client ID for the Amazon Cognito user pools.
-
(AWS.Response)
—
Returns:
updateBackendJob(params = {}, callback) ⇒ AWS.Request
Updates a specific job.
Service Reference:
Examples:
Calling the updateBackendJob operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
JobId: 'STRING_VALUE', /* required */
Operation: 'STRING_VALUE',
Status: 'STRING_VALUE'
};
amplifybackend.updateBackendJob(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Operation
— (String
)Filters the list of response objects to include only those with the specified operation name.
Status
— (String
)Filters the list of response objects to include only those with the specified status.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
CreateTime
— (String
)The time when the job was created.
Error
— (String
)If the request fails, this error is returned.
JobId
— (String
)The ID for the job.
Operation
— (String
)The name of the operation.
Status
— (String
)The current status of the request.
UpdateTime
— (String
)The time when the job was last updated.
-
(AWS.Response)
—
Returns:
updateBackendStorage(params = {}, callback) ⇒ AWS.Request
Updates an existing backend storage resource.
Service Reference:
Examples:
Calling the updateBackendStorage operation
var params = {
AppId: 'STRING_VALUE', /* required */
BackendEnvironmentName: 'STRING_VALUE', /* required */
ResourceConfig: { /* required */
Permissions: { /* required */
Authenticated: [ /* required */
READ | CREATE_AND_UPDATE | DELETE,
/* more items */
],
UnAuthenticated: [
READ | CREATE_AND_UPDATE | DELETE,
/* more items */
]
},
ServiceName: S3 /* required */
},
ResourceName: 'STRING_VALUE' /* required */
};
amplifybackend.updateBackendStorage(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
ResourceConfig
— (map
)The resource configuration for updating backend storage.
Permissions
— required — (map
)The authorization configuration for the storage S3 bucket.
Authenticated
— required — (Array<String>
)Lists all authenticated user read, write, and delete permissions for your S3 bucket.
UnAuthenticated
— (Array<String>
)Lists all unauthenticated user read, write, and delete permissions for your S3 bucket.
ServiceName
— required — (String
)The name of the storage service.
Possible values include:"S3"
ResourceName
— (String
)The name of the storage resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AppId
— (String
)The app ID.
BackendEnvironmentName
— (String
)The name of the backend environment.
JobId
— (String
)The ID for the job.
Status
— (String
)The current status of the request.
-
(AWS.Response)
—
Returns: