Class: AWS.Signer

Inherits:
AWS.Service show all
Identifier:
signer
API Version:
2017-08-25
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

You can use Code Signing for Amazon FreeRTOS (AWS Signer) to sign code that you created for any of the IoT devices that Amazon Web Services supports. AWS Signer is integrated with Amazon FreeRTOS, AWS Certificate Manager, and AWS CloudTrail. Amazon FreeRTOS customers can use AWS Signer to sign code images before making them available for microcontrollers. You can use ACM to import third-party certificates to be used by AWS Signer. For general information about using AWS Signer, see the Code Signing for Amazon FreeRTOS Developer Guide.

Sending a Request Using Signer

var signer = new AWS.Signer();
signer.cancelSigningProfile(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 Signer object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var signer = new AWS.Signer({apiVersion: '2017-08-25'});

You can also set the API version globally in AWS.config.apiVersions using the signer service identifier:

AWS.config.apiVersions = {
  signer: '2017-08-25',
  // other service API versions
};

var signer = new AWS.Signer();

Version:

  • 2017-08-25

Waiter Resource States

This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:

successfulSigningJob

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.Signer(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Signer object

var signer = new AWS.Signer({apiVersion: '2017-08-25'});

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)

    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'.

  • 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.Signer.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Signer.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Signer.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.
  • 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 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 returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • 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)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • 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.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

cancelSigningProfile(params = {}, callback) ⇒ AWS.Request

Changes the state of an ACTIVE signing profile to CANCELED. A canceled profile is still viewable with the ListSigningProfiles operation, but it cannot perform new signing jobs, and is deleted two years after cancelation.

Service Reference:

Examples:

Calling the cancelSigningProfile operation

var params = {
  profileName: 'STRING_VALUE' /* required */
};
signer.cancelSigningProfile(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: {})
    • profileName — (String)

      The name of the signing profile to be canceled.

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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeSigningJob(params = {}, callback) ⇒ AWS.Request

Returns information about a specific code signing job. You specify the job by using the jobId value that is returned by the StartSigningJob operation.

Service Reference:

Examples:

Calling the describeSigningJob operation

var params = {
  jobId: 'STRING_VALUE' /* required */
};
signer.describeSigningJob(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: {})
    • jobId — (String)

      The ID of the signing job on input.

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. The data object has the following properties:

      • jobId — (String)

        The ID of the signing job on output.

      • source — (map)

        The object that contains the name of your S3 bucket or your raw code.

        • s3 — (map)

          The S3Source object.

          • bucketNamerequired — (String)

            Name of the S3 bucket.

          • keyrequired — (String)

            Key name of the bucket object that contains your unsigned code.

          • versionrequired — (String)

            Version of your source image in your version enabled S3 bucket.

      • signingMaterial — (map)

        Amazon Resource Name (ARN) of your code signing certificate.

        • certificateArnrequired — (String)

          The Amazon Resource Name (ARN) of the certificates that is used to sign your code.

      • platformId — (String)

        The microcontroller platform to which your signed code image will be distributed.

      • profileName — (String)

        The name of the profile that initiated the signing operation.

      • overrides — (map)

        A list of any overrides that were applied to the signing operation.

        • signingConfiguration — (map)

          A signing configuration that overrides the default encryption or hash algorithm of a signing job.

          • encryptionAlgorithm — (String)

            A specified override of the default encryption algorithm that is used in an AWS Signer job.

            Possible values include:
            • "RSA"
            • "ECDSA"
          • hashAlgorithm — (String)

            A specified override of the default hash algorithm that is used in an AWS Signer job.

            Possible values include:
            • "SHA1"
            • "SHA256"
      • signingParameters — (map<String>)

        Map of user-assigned key-value pairs used during signing. These values contain any information that you specified for use in your signing job.

      • createdAt — (Date)

        Date and time that the signing job was created.

      • completedAt — (Date)

        Date and time that the signing job was completed.

      • requestedBy — (String)

        The IAM principal that requested the signing job.

      • status — (String)

        Status of the signing job.

        Possible values include:
        • "InProgress"
        • "Failed"
        • "Succeeded"
      • statusReason — (String)

        String value that contains the status reason.

      • signedObject — (map)

        Name of the S3 bucket where the signed code image is saved by AWS Signer.

        • s3 — (map)

          The S3SignedObject.

          • bucketName — (String)

            Name of the S3 bucket.

          • key — (String)

            Key name that uniquely identifies a signed code image in your bucket.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

getSigningPlatform(params = {}, callback) ⇒ AWS.Request

Returns information on a specific signing platform.

Service Reference:

Examples:

Calling the getSigningPlatform operation

var params = {
  platformId: 'STRING_VALUE' /* required */
};
signer.getSigningPlatform(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: {})
    • platformId — (String)

      The ID of the target signing platform.

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. The data object has the following properties:

      • platformId — (String)

        The ID of the target signing platform.

      • displayName — (String)

        The display name of the target signing platform.

      • partner — (String)

        A list of partner entities that use the target signing platform.

      • target — (String)

        The validation template that is used by the target signing platform.

      • category — (String)

        The category type of the target signing platform.

        Possible values include:
        • "AWSIoT"
      • signingConfiguration — (map)

        A list of configurations applied to the target platform at signing.

        • encryptionAlgorithmOptionsrequired — (map)

          The encryption algorithm options that are available for an AWS Signer job.

          • allowedValuesrequired — (Array<String>)

            The set of accepted encryption algorithms that are allowed in an AWS Signer job.

          • defaultValuerequired — (String)

            The default encryption algorithm that is used by an AWS Signer job.

            Possible values include:
            • "RSA"
            • "ECDSA"
        • hashAlgorithmOptionsrequired — (map)

          The hash algorithm options that are available for an AWS Signer job.

          • allowedValuesrequired — (Array<String>)

            The set of accepted hash algorithms allowed in an AWS Signer job.

          • defaultValuerequired — (String)

            The default hash algorithm that is used in an AWS Signer job.

            Possible values include:
            • "SHA1"
            • "SHA256"
      • signingImageFormat — (map)

        The format of the target platform's signing image.

        • supportedFormatsrequired — (Array<String>)

          The supported formats of an AWS Signer signing image.

        • defaultFormatrequired — (String)

          The default format of an AWS Signer signing image.

          Possible values include:
          • "JSON"
      • maxSizeInMB — (Integer)

        The maximum size (in MB) of the payload that can be signed by the target platform.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSigningProfile(params = {}, callback) ⇒ AWS.Request

Returns information on a specific signing profile.

Service Reference:

Examples:

Calling the getSigningProfile operation

var params = {
  profileName: 'STRING_VALUE' /* required */
};
signer.getSigningProfile(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: {})
    • profileName — (String)

      The name of the target signing profile.

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. The data object has the following properties:

      • profileName — (String)

        The name of the target signing profile.

      • signingMaterial — (map)

        The ARN of the certificate that the target profile uses for signing operations.

        • certificateArnrequired — (String)

          The Amazon Resource Name (ARN) of the certificates that is used to sign your code.

      • platformId — (String)

        The ID of the platform that is used by the target signing profile.

      • overrides — (map)

        A list of overrides applied by the target signing profile for signing operations.

        • signingConfiguration — (map)

          A signing configuration that overrides the default encryption or hash algorithm of a signing job.

          • encryptionAlgorithm — (String)

            A specified override of the default encryption algorithm that is used in an AWS Signer job.

            Possible values include:
            • "RSA"
            • "ECDSA"
          • hashAlgorithm — (String)

            A specified override of the default hash algorithm that is used in an AWS Signer job.

            Possible values include:
            • "SHA1"
            • "SHA256"
      • signingParameters — (map<String>)

        A map of key-value pairs for signing operations that is attached to the target signing profile.

      • status — (String)

        The status of the target signing profile.

        Possible values include:
        • "Active"
        • "Canceled"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSigningJobs(params = {}, callback) ⇒ AWS.Request

Lists all your signing jobs. You can use the maxResults parameter to limit the number of signing jobs that are returned in the response. If additional jobs remain to be listed, AWS Signer returns a nextToken value. Use this value in subsequent calls to ListSigningJobs to fetch the remaining values. You can continue calling ListSigningJobs with your maxResults parameter and with new values that AWS Signer returns in the nextToken parameter until all of your signing jobs have been returned.

Service Reference:

Examples:

Calling the listSigningJobs operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  platformId: 'STRING_VALUE',
  requestedBy: 'STRING_VALUE',
  status: InProgress | Failed | Succeeded
};
signer.listSigningJobs(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: {})
    • status — (String)

      A status value with which to filter your results.

      Possible values include:
      • "InProgress"
      • "Failed"
      • "Succeeded"
    • platformId — (String)

      The ID of microcontroller platform that you specified for the distribution of your code image.

    • requestedBy — (String)

      The IAM principal that requested the signing job.

    • maxResults — (Integer)

      Specifies the maximum number of items to return in the response. Use this parameter when paginating results. If additional items exist beyond the number you specify, the nextToken element is set in the response. Use the nextToken value in a subsequent request to retrieve additional items.

    • nextToken — (String)

      String for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of nextToken from the response that you just received.

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. The data object has the following properties:

      • jobs — (Array<map>)

        A list of your signing jobs.

        • jobId — (String)

          The ID of the signing job.

        • source — (map)

          A Source that contains information about a signing job's code image source.

          • s3 — (map)

            The S3Source object.

            • bucketNamerequired — (String)

              Name of the S3 bucket.

            • keyrequired — (String)

              Key name of the bucket object that contains your unsigned code.

            • versionrequired — (String)

              Version of your source image in your version enabled S3 bucket.

        • signedObject — (map)

          A SignedObject structure that contains information about a signing job's signed code image.

          • s3 — (map)

            The S3SignedObject.

            • bucketName — (String)

              Name of the S3 bucket.

            • key — (String)

              Key name that uniquely identifies a signed code image in your bucket.

        • signingMaterial — (map)

          A SigningMaterial object that contains the Amazon Resource Name (ARN) of the certificate used for the signing job.

          • certificateArnrequired — (String)

            The Amazon Resource Name (ARN) of the certificates that is used to sign your code.

        • createdAt — (Date)

          The date and time that the signing job was created.

        • status — (String)

          The status of the signing job.

          Possible values include:
          • "InProgress"
          • "Failed"
          • "Succeeded"
      • nextToken — (String)

        String for specifying the next set of paginated results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSigningPlatforms(params = {}, callback) ⇒ AWS.Request

Lists all signing platforms available in AWS Signer that match the request parameters. If additional jobs remain to be listed, AWS Signer returns a nextToken value. Use this value in subsequent calls to ListSigningJobs to fetch the remaining values. You can continue calling ListSigningJobs with your maxResults parameter and with new values that AWS Signer returns in the nextToken parameter until all of your signing jobs have been returned.

Service Reference:

Examples:

Calling the listSigningPlatforms operation

var params = {
  category: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  partner: 'STRING_VALUE',
  target: 'STRING_VALUE'
};
signer.listSigningPlatforms(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: {})
    • category — (String)

      The category type of a signing platform.

    • partner — (String)

      Any partner entities connected to a signing platform.

    • target — (String)

      The validation template that is used by the target signing platform.

    • maxResults — (Integer)

      The maximum number of results to be returned by this operation.

    • nextToken — (String)

      Value for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of nextToken from the response that you just received.

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. The data object has the following properties:

      • platforms — (Array<map>)

        A list of all platforms that match the request parameters.

        • platformId — (String)

          The ID of an AWS Signer platform.

        • displayName — (String)

          The display name of an AWS Signer platform.

        • partner — (String)

          Any partner entities linked to an AWS Signer platform.

        • target — (String)

          The types of targets that can be signed by an AWS Signer platform.

        • category — (String)

          The category of an AWS Signer platform.

          Possible values include:
          • "AWSIoT"
        • signingConfiguration — (map)

          The configuration of an AWS Signer platform. This includes the designated hash algorithm and encryption algorithm of a signing platform.

          • encryptionAlgorithmOptionsrequired — (map)

            The encryption algorithm options that are available for an AWS Signer job.

            • allowedValuesrequired — (Array<String>)

              The set of accepted encryption algorithms that are allowed in an AWS Signer job.

            • defaultValuerequired — (String)

              The default encryption algorithm that is used by an AWS Signer job.

              Possible values include:
              • "RSA"
              • "ECDSA"
          • hashAlgorithmOptionsrequired — (map)

            The hash algorithm options that are available for an AWS Signer job.

            • allowedValuesrequired — (Array<String>)

              The set of accepted hash algorithms allowed in an AWS Signer job.

            • defaultValuerequired — (String)

              The default hash algorithm that is used in an AWS Signer job.

              Possible values include:
              • "SHA1"
              • "SHA256"
        • signingImageFormat — (map)

          The signing image format that is used by an AWS Signer platform.

          • supportedFormatsrequired — (Array<String>)

            The supported formats of an AWS Signer signing image.

          • defaultFormatrequired — (String)

            The default format of an AWS Signer signing image.

            Possible values include:
            • "JSON"
        • maxSizeInMB — (Integer)

          The maximum size (in MB) of code that can be signed by a AWS Signer platform.

      • nextToken — (String)

        Value for specifying the next set of paginated results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSigningProfiles(params = {}, callback) ⇒ AWS.Request

Lists all available signing profiles in your AWS account. Returns only profiles with an ACTIVE status unless the includeCanceled request field is set to true. If additional jobs remain to be listed, AWS Signer returns a nextToken value. Use this value in subsequent calls to ListSigningJobs to fetch the remaining values. You can continue calling ListSigningJobs with your maxResults parameter and with new values that AWS Signer returns in the nextToken parameter until all of your signing jobs have been returned.

Service Reference:

Examples:

Calling the listSigningProfiles operation

var params = {
  includeCanceled: true || false,
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
signer.listSigningProfiles(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: {})
    • includeCanceled — (Boolean)

      Designates whether to include profiles with the status of CANCELED.

    • maxResults — (Integer)

      The maximum number of profiles to be returned.

    • nextToken — (String)

      Value for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of nextToken from the response that you just received.

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. The data object has the following properties:

      • profiles — (Array<map>)

        A list of profiles that are available in the AWS account. This includes profiles with the status of CANCELED if the includeCanceled parameter is set to true.

        • profileName — (String)

          The name of the AWS Signer profile.

        • signingMaterial — (map)

          The ACM certificate that is available for use by a signing profile.

          • certificateArnrequired — (String)

            The Amazon Resource Name (ARN) of the certificates that is used to sign your code.

        • platformId — (String)

          The ID of a platform that is available for use by a signing profile.

        • signingParameters — (map<String>)

          The parameters that are available for use by an AWS Signer user.

        • status — (String)

          The status of an AWS Signer profile.

          Possible values include:
          • "Active"
          • "Canceled"
      • nextToken — (String)

        Value for specifying the next set of paginated results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putSigningProfile(params = {}, callback) ⇒ AWS.Request

Creates a signing profile. A signing profile is an AWS Signer template that can be used to carry out a pre-defined signing job. For more information, see http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html

Service Reference:

Examples:

Calling the putSigningProfile operation

var params = {
  platformId: 'STRING_VALUE', /* required */
  profileName: 'STRING_VALUE', /* required */
  signingMaterial: { /* required */
    certificateArn: 'STRING_VALUE' /* required */
  },
  overrides: {
    signingConfiguration: {
      encryptionAlgorithm: RSA | ECDSA,
      hashAlgorithm: SHA1 | SHA256
    }
  },
  signingParameters: {
    '<SigningParameterKey>': 'STRING_VALUE',
    /* '<SigningParameterKey>': ... */
  }
};
signer.putSigningProfile(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: {})
    • profileName — (String)

      The name of the signing profile to be created.

    • signingMaterial — (map)

      The AWS Certificate Manager certificate that will be used to sign code with the new signing profile.

      • certificateArnrequired — (String)

        The Amazon Resource Name (ARN) of the certificates that is used to sign your code.

    • platformId — (String)

      The ID of the signing profile to be created.

    • overrides — (map)

      A subfield of platform. This specifies any different configuration options that you want to apply to the chosen platform (such as a different hash-algorithm or signing-algorithm).

      • signingConfiguration — (map)

        A signing configuration that overrides the default encryption or hash algorithm of a signing job.

        • encryptionAlgorithm — (String)

          A specified override of the default encryption algorithm that is used in an AWS Signer job.

          Possible values include:
          • "RSA"
          • "ECDSA"
        • hashAlgorithm — (String)

          A specified override of the default hash algorithm that is used in an AWS Signer job.

          Possible values include:
          • "SHA1"
          • "SHA256"
    • signingParameters — (map<String>)

      Map of key-value pairs for signing. These can include any information that you want to use during signing.

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. The data object has the following properties:

      • arn — (String)

        The Amazon Resource Name (ARN) of the signing profile created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

startSigningJob(params = {}, callback) ⇒ AWS.Request

Initiates a signing job to be performed on the code provided. Signing jobs are viewable by the ListSigningJobs operation for two years after they are performed. Note the following requirements:

  • You must create an Amazon S3 source bucket. For more information, see Create a Bucket in the Amazon S3 Getting Started Guide.

  • Your S3 source bucket must be version enabled.

  • You must create an S3 destination bucket. AWS Signer uses your S3 destination bucket to write your signed code.

  • You specify the name of the source and destination buckets when calling the StartSigningJob operation.

  • You must also specify a request token that identifies your request to AWS Signer.

You can call the DescribeSigningJob and the ListSigningJobs actions after you call StartSigningJob.

For a Java example that shows how to use this action, see http://docs.aws.amazon.com/acm/latest/userguide/

Service Reference:

Examples:

Calling the startSigningJob operation

var params = {
  clientRequestToken: 'STRING_VALUE', /* required */
  destination: { /* required */
    s3: {
      bucketName: 'STRING_VALUE',
      prefix: 'STRING_VALUE'
    }
  },
  source: { /* required */
    s3: {
      bucketName: 'STRING_VALUE', /* required */
      key: 'STRING_VALUE', /* required */
      version: 'STRING_VALUE' /* required */
    }
  },
  profileName: 'STRING_VALUE'
};
signer.startSigningJob(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: {})
    • source — (map)

      The S3 bucket that contains the object to sign or a BLOB that contains your raw code.

      • s3 — (map)

        The S3Source object.

        • bucketNamerequired — (String)

          Name of the S3 bucket.

        • keyrequired — (String)

          Key name of the bucket object that contains your unsigned code.

        • versionrequired — (String)

          Version of your source image in your version enabled S3 bucket.

    • destination — (map)

      The S3 bucket in which to save your signed object. The destination contains the name of your bucket and an optional prefix.

      • s3 — (map)

        The S3Destination object.

        • bucketName — (String)

          Name of the S3 bucket.

        • prefix — (String)

          An Amazon S3 prefix that you can use to limit responses to those that begin with the specified prefix.

    • profileName — (String)

      The name of the signing profile.

    • clientRequestToken — (String)

      String that identifies the signing request. All calls after the first that use this token return the same response as the first call.

      If a token is not provided, the SDK will use a version 4 UUID.

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. The data object has the following properties:

      • jobId — (String)

        The ID of your signing job.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given Signer resource. The final callback or 'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.

Examples:

Waiting for the successfulSigningJob state

var params = {
  jobId: 'STRING_VALUE' /* required */
};
signer.waitFor('successfulSigningJob', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • state (String)

    the resource state to wait for. Available states for this service are listed in "Waiter Resource States" below.

  • params (map) (defaults to: {})

    a list of parameters for the given state. See each waiter resource state for required parameters.

Callback (callback):

  • function(err, data) { ... }

    Callback containing error and data information. See the respective resource state for the expected error or data information.

    If the waiter times out its requests, it will return a ResourceNotReady error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

Waiter Resource States:

Waiter Resource Details

signer.waitFor('successfulSigningJob', params = {}, [callback]) ⇒ AWS.Request

Waits for the successfulSigningJob state by periodically calling the underlying Signer.describeSigningJob() operation every 20 seconds (at most 25 times).

Examples:

Waiting for the successfulSigningJob state

var params = {
  jobId: 'STRING_VALUE' /* required */
};
signer.waitFor('successfulSigningJob', params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object)
    • jobId — (String)

      The ID of the signing job on input.

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. The data object has the following properties:

      • jobId — (String)

        The ID of the signing job on output.

      • source — (map)

        The object that contains the name of your S3 bucket or your raw code.

        • s3 — (map)

          The S3Source object.

          • bucketNamerequired — (String)

            Name of the S3 bucket.

          • keyrequired — (String)

            Key name of the bucket object that contains your unsigned code.

          • versionrequired — (String)

            Version of your source image in your version enabled S3 bucket.

      • signingMaterial — (map)

        Amazon Resource Name (ARN) of your code signing certificate.

        • certificateArnrequired — (String)

          The Amazon Resource Name (ARN) of the certificates that is used to sign your code.

      • platformId — (String)

        The microcontroller platform to which your signed code image will be distributed.

      • profileName — (String)

        The name of the profile that initiated the signing operation.

      • overrides — (map)

        A list of any overrides that were applied to the signing operation.

        • signingConfiguration — (map)

          A signing configuration that overrides the default encryption or hash algorithm of a signing job.

          • encryptionAlgorithm — (String)

            A specified override of the default encryption algorithm that is used in an AWS Signer job.

            Possible values include:
            • "RSA"
            • "ECDSA"
          • hashAlgorithm — (String)

            A specified override of the default hash algorithm that is used in an AWS Signer job.

            Possible values include:
            • "SHA1"
            • "SHA256"
      • signingParameters — (map<String>)

        Map of user-assigned key-value pairs used during signing. These values contain any information that you specified for use in your signing job.

      • createdAt — (Date)

        Date and time that the signing job was created.

      • completedAt — (Date)

        Date and time that the signing job was completed.

      • requestedBy — (String)

        The IAM principal that requested the signing job.

      • status — (String)

        Status of the signing job.

        Possible values include:
        • "InProgress"
        • "Failed"
        • "Succeeded"
      • statusReason — (String)

        String value that contains the status reason.

      • signedObject — (map)

        Name of the S3 bucket where the signed code image is saved by AWS Signer.

        • s3 — (map)

          The S3SignedObject.

          • bucketName — (String)

            Name of the S3 bucket.

          • key — (String)

            Key name that uniquely identifies a signed code image in your bucket.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

See Also: