We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.RAM

Inherits:
AWS.Service show all
Identifier:
ram
API Version:
2018-01-04
Defined in:
(unknown)

Overview

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

Service Description

This is the Resource Access Manager API Reference. This documentation provides descriptions and syntax for each of the actions and data types in RAM. RAM is a service that helps you securely share your Amazon Web Services resources to other Amazon Web Services accounts. If you use Organizations to manage your accounts, then you can share your resources with your entire organization or to organizational units (OUs). For supported resource types, you can also share resources with individual Identity and Access Management (IAM) roles and users.

To learn more about RAM, see the following resources:

Sending a Request Using RAM

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

var ram = new AWS.RAM({apiVersion: '2018-01-04'});

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

AWS.config.apiVersions = {
  ram: '2018-01-04',
  // other service API versions
};

var ram = new AWS.RAM();

Version:

  • 2018-01-04

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

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

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

Examples:

Constructing a RAM object

var ram = new AWS.RAM({apiVersion: '2018-01-04'});

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

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.RAM.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.

  • 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

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

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

Accepts an invitation to a resource share from another Amazon Web Services account. After you accept the invitation, the resources included in the resource share are available to interact with in the relevant Amazon Web Services Management Consoles and tools.

Service Reference:

Examples:

Calling the acceptResourceShareInvitation operation

var params = {
  resourceShareInvitationArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.acceptResourceShareInvitation(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: {})
    • resourceShareInvitationArn — (String)

      The Amazon Resource Name (ARN) of the invitation that you want to accept.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • resourceShareInvitation — (map)

        An object that contains information about the specified invitation.

        • resourceShareInvitationArn — (String)

          The Amazon Resource Name (ARN) of the invitation.

        • resourceShareName — (String)

          The name of the resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share

        • senderAccountId — (String)

          The ID of the Amazon Web Services account that sent the invitation.

        • receiverAccountId — (String)

          The ID of the Amazon Web Services account that received the invitation.

        • invitationTimestamp — (Date)

          The date and time when the invitation was sent.

        • status — (String)

          The current status of the invitation.

          Possible values include:
          • "PENDING"
          • "ACCEPTED"
          • "REJECTED"
          • "EXPIRED"
        • resourceShareAssociations — (Array<map>)

          To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources.

          • resourceShareArn — (String)

            The Amazon Resource Name (ARN) of the resource share.

          • resourceShareName — (String)

            The name of the resource share.

          • associatedEntity — (String)

            The associated entity. This can be either of the following:

            • For a resource association, this is the Amazon Resource Name (ARN) of the resource.

            • For principal associations, this is one of the following:

              • The ID of an Amazon Web Services account

              • The Amazon Resource Name (ARN) of an organization in Organizations

              • The ARN of an organizational unit (OU) in Organizations

              • The ARN of an IAM role

              • The ARN of an IAM user

          • associationType — (String)

            The type of entity included in this association.

            Possible values include:
            • "PRINCIPAL"
            • "RESOURCE"
          • status — (String)

            The current status of the association.

            Possible values include:
            • "ASSOCIATING"
            • "ASSOCIATED"
            • "FAILED"
            • "DISASSOCIATING"
            • "DISASSOCIATED"
          • statusMessage — (String)

            A message about the status of the association.

          • creationTime — (Date)

            The date and time when the association was created.

          • lastUpdatedTime — (Date)

            The date and time when the association was last updated.

          • external — (Boolean)

            Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

        • receiverArn — (String)

          The Amazon Resource Name (ARN) of the IAM user or role that received the invitation.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Adds the specified list of principals and list of resources to a resource share. Principals that already have access to this resource share immediately receive access to the added resources. Newly added principals immediately receive access to the resources shared in this resource share.

Service Reference:

Examples:

Calling the associateResourceShare operation

var params = {
  resourceShareArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  principals: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceArns: [
    'STRING_VALUE',
    /* more items */
  ],
  sources: [
    'STRING_VALUE',
    /* more items */
  ]
};
ram.associateResourceShare(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share that you want to add principals or resources to.

    • resourceArns — (Array<String>)

      Specifies a list of Amazon Resource Names (ARNs) of the resources that you want to share. This can be null if you want to add only principals.

    • principals — (Array<String>)

      Specifies a list of principals to whom you want to the resource share. This can be null if you want to add only resources.

      What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See AssociateResourceSharePermission.

      You can include the following values:

      • An Amazon Web Services account ID, for example: 123456789012

      • An Amazon Resource Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid

      • An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123

      • An ARN of an IAM role, for example: iam::123456789012:role/rolename

      • An ARN of an IAM user, for example: iam::123456789012user/username

      Note: Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

    • sources — (Array<String>)

      Specifies from which source accounts the service principal has access to the resources in this resource share.

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:

      • resourceShareAssociations — (Array<map>)

        An array of objects that contain information about the associations.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share.

        • resourceShareName — (String)

          The name of the resource share.

        • associatedEntity — (String)

          The associated entity. This can be either of the following:

          • For a resource association, this is the Amazon Resource Name (ARN) of the resource.

          • For principal associations, this is one of the following:

            • The ID of an Amazon Web Services account

            • The Amazon Resource Name (ARN) of an organization in Organizations

            • The ARN of an organizational unit (OU) in Organizations

            • The ARN of an IAM role

            • The ARN of an IAM user

        • associationType — (String)

          The type of entity included in this association.

          Possible values include:
          • "PRINCIPAL"
          • "RESOURCE"
        • status — (String)

          The current status of the association.

          Possible values include:
          • "ASSOCIATING"
          • "ASSOCIATED"
          • "FAILED"
          • "DISASSOCIATING"
          • "DISASSOCIATED"
        • statusMessage — (String)

          A message about the status of the association.

        • creationTime — (Date)

          The date and time when the association was created.

        • lastUpdatedTime — (Date)

          The date and time when the association was last updated.

        • external — (Boolean)

          Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Adds or replaces the RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new RAM permission only if there are currently no resources of that resource type currently in the resource share.

Examples:

Calling the associateResourceSharePermission operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  resourceShareArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  permissionVersion: 'NUMBER_VALUE',
  replace: true || false
};
ram.associateResourceSharePermission(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share to which you want to add or replace permissions.

    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.

    • replace — (Boolean)

      Specifies whether the specified permission should replace the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to a resource share that currently doesn't have a permission. The default value is false.

      Note: A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.
    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

    • permissionVersion — (Integer)

      Specifies the version of the RAM permission to associate with the resource share. You can specify only the version that is currently set as the default version for the permission. If you also set the replace pararameter to true, then this operation updates an outdated version of the permission to the current default version.

      Note: You don't need to specify this parameter because the default behavior is to use the version that is currently set as the default version for the permission. This parameter is supported for backwards compatibility.

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:

      • returnValue — (Boolean)

        A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Creates a customer managed permission for a specified resource type that you can attach to resource shares. It is created in the Amazon Web Services Region in which you call the operation.

Service Reference:

Examples:

Calling the createPermission operation

var params = {
  name: 'STRING_VALUE', /* required */
  policyTemplate: 'STRING_VALUE', /* required */
  resourceType: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ram.createPermission(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: {})
    • name — (String)

      Specifies the name of the customer managed permission. The name must be unique within the Amazon Web Services Region.

    • resourceType — (String)

      Specifies the name of the resource type that this customer managed permission applies to.

      The format is <service-code>:<resource-type> and is not case sensitive. For example, to specify an Amazon EC2 Subnet, you can use the string ec2:subnet. To see the list of valid values for this parameter, query the ListResourceTypes operation.

    • policyTemplate — (String)

      A string in JSON format string that contains the following elements of a resource-based policy:

      • Effect: must be set to ALLOW.

      • Action: specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for Amazon Web Services services in the Identity and Access Management User Guide.

      • Condition: (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the Identity and Access Management User Guide.

      This template can't include either the Resource or Principal elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

    • tags — (Array<map>)

      Specifies a list of one or more tag key and value pairs to attach to the permission.

      • key — (String)

        The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

      • value — (String)

        The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

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:

      • permission — (map)

        A structure with information about this customer managed permission.

        • arn — (String)

          The Amazon Resource Name (ARN) of the permission you want information about.

        • version — (String)

          The version of the permission associated with this resource share.

        • defaultVersion — (Boolean)

          Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.

        • name — (String)

          The name of this managed permission.

        • resourceType — (String)

          The type of resource to which this permission applies. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • status — (String)

          The current status of the permission.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the managed permission associated with this resource share is the default managed permission for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • tags — (Array<map>)

          A list of the tag key value pairs currently attached to the permission.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Creates a new version of the specified customer managed permission. The new version is automatically set as the default version of the customer managed permission. New resource shares automatically use the default permission. Existing resource shares continue to use their original permission versions, but you can use ReplacePermissionAssociations to update them.

If the specified customer managed permission already has the maximum of 5 versions, then you must delete one of the existing versions before you can create a new one.

Service Reference:

Examples:

Calling the createPermissionVersion operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  policyTemplate: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.createPermissionVersion(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the customer managed permission you're creating a new version for.

    • policyTemplate — (String)

      A string in JSON format string that contains the following elements of a resource-based policy:

      • Effect: must be set to ALLOW.

      • Action: specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for Amazon Web Services services in the Identity and Access Management User Guide.

      • Condition: (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the Identity and Access Management User Guide.

      This template can't include either the Resource or Principal elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • permission — (map)

        Information about a RAM managed permission.

        • arn — (String)

          The Amazon Resource Name (ARN) of this RAM managed permission.

        • version — (String)

          The version of the permission described in this response.

        • defaultVersion — (Boolean)

          Specifies whether the version of the permission represented in this response is the default version for this permission.

        • name — (String)

          The name of this permission.

        • resourceType — (String)

          The resource type to which this permission applies.

        • permission — (String)

          The permission's effect and actions in JSON format. The effect indicates whether the specified actions are allowed or denied. The actions list the operations to which the principal is granted or denied access.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the version of the permission represented in this response is the default version for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • status — (String)

          The current status of the association between the permission and the resource share. The following are the possible values:

          • ATTACHABLE – This permission or version can be associated with resource shares.

          • UNATTACHABLE – This permission or version can't currently be associated with resource shares.

          • DELETING – This permission or version is in the process of being deleted.

          • DELETED – This permission or version is deleted.

          Possible values include:
          • "ATTACHABLE"
          • "UNATTACHABLE"
          • "DELETING"
          • "DELETED"
        • tags — (Array<map>)

          The tag key and value pairs attached to the resource share.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Creates a resource share. You can provide a list of the Amazon Resource Names (ARNs) for the resources that you want to share, a list of principals you want to share the resources with, and the permissions to grant those principals.

Note: Sharing a resource makes it available for use by principals outside of the Amazon Web Services account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.

Service Reference:

Examples:

Calling the createResourceShare operation

var params = {
  name: 'STRING_VALUE', /* required */
  allowExternalPrincipals: true || false,
  clientToken: 'STRING_VALUE',
  permissionArns: [
    'STRING_VALUE',
    /* more items */
  ],
  principals: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceArns: [
    'STRING_VALUE',
    /* more items */
  ],
  sources: [
    'STRING_VALUE',
    /* more items */
  ],
  tags: [
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ]
};
ram.createResourceShare(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: {})
    • name — (String)

      Specifies the name of the resource share.

    • resourceArns — (Array<String>)

      Specifies a list of one or more ARNs of the resources to associate with the resource share.

    • principals — (Array<String>)

      Specifies a list of one or more principals to associate with the resource share.

      You can include the following values:

      • An Amazon Web Services account ID, for example: 123456789012

      • An Amazon Resource Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid

      • An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123

      • An ARN of an IAM role, for example: iam::123456789012:role/rolename

      • An ARN of an IAM user, for example: iam::123456789012user/username

      Note: Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
    • tags — (Array<map>)

      Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.

      • key — (String)

        The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

      • value — (String)

        The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

    • allowExternalPrincipals — (Boolean)

      Specifies whether principals outside your organization in Organizations can be associated with a resource share. A value of true lets you share with individual Amazon Web Services accounts that are not in your organization. A value of false only has meaning if your account is a member of an Amazon Web Services Organization. The default value is true.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

    • permissionArns — (Array<String>)

      Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.

    • sources — (Array<String>)

      Specifies from which source accounts the service principal has access to the resources in this resource share.

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:

      • resourceShare — (map)

        An object with information about the new resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share

        • name — (String)

          The name of the resource share.

        • owningAccountId — (String)

          The ID of the Amazon Web Services account that owns the resource share.

        • allowExternalPrincipals — (Boolean)

          Indicates whether principals outside your organization in Organizations can be associated with a resource share.

          • True – the resource share can be shared with any Amazon Web Services account.

          • False – the resource share can be shared with only accounts in the same organization as the account that owns the resource share.

        • status — (String)

          The current status of the resource share.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "FAILED"
          • "DELETING"
          • "DELETED"
        • statusMessage — (String)

          A message about the status of the resource share.

        • tags — (Array<map>)

          The tag key and value pairs attached to the resource share.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

        • creationTime — (Date)

          The date and time when the resource share was created.

        • lastUpdatedTime — (Date)

          The date and time when the resource share was last updated.

        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Deletes the specified customer managed permission in the Amazon Web Services Region in which you call this operation. You can delete a customer managed permission only if it isn't attached to any resource share. The operation deletes all versions associated with the customer managed permission.

Service Reference:

Examples:

Calling the deletePermission operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.deletePermission(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the customer managed permission that you want to delete.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • returnValue — (Boolean)

        A boolean that indicates whether the delete operations succeeded.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

      • permissionStatus — (String)

        This operation is performed asynchronously, and this response parameter indicates the current status.

        Possible values include:
        • "ATTACHABLE"
        • "UNATTACHABLE"
        • "DELETING"
        • "DELETED"

Returns:

  • (AWS.Request)

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

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

Deletes one version of a customer managed permission. The version you specify must not be attached to any resource share and must not be the default version for the permission.

If a customer managed permission has the maximum of 5 versions, then you must delete at least one version before you can create another.

Service Reference:

Examples:

Calling the deletePermissionVersion operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  permissionVersion: 'NUMBER_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.deletePermissionVersion(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the permission with the version you want to delete.

    • permissionVersion — (Integer)

      Specifies the version number to delete.

      You can't delete the default version for a customer managed permission.

      You can't delete a version if it's the only version of the permission. You must either first create another version, or delete the permission completely.

      You can't delete a version if it is attached to any resource shares. If the version is the default, you must first use SetDefaultPermissionVersion to set a different version as the default for the customer managed permission, and then use AssociateResourceSharePermission to update your resource shares to use the new default version.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • returnValue — (Boolean)

        A boolean value that indicates whether the operation is successful.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

      • permissionStatus — (String)

        This operation is performed asynchronously, and this response parameter indicates the current status.

        Possible values include:
        • "ATTACHABLE"
        • "UNATTACHABLE"
        • "DELETING"
        • "DELETED"

Returns:

  • (AWS.Request)

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

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

Deletes the specified resource share.

This doesn't delete any of the resources that were associated with the resource share; it only stops the sharing of those resources through this resource share.

Service Reference:

Examples:

Calling the deleteResourceShare operation

var params = {
  resourceShareArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.deleteResourceShare(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share to delete.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • returnValue — (Boolean)

        A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Removes the specified principals or resources from participating in the specified resource share.

Service Reference:

Examples:

Calling the disassociateResourceShare operation

var params = {
  resourceShareArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  principals: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceArns: [
    'STRING_VALUE',
    /* more items */
  ],
  sources: [
    'STRING_VALUE',
    /* more items */
  ]
};
ram.disassociateResourceShare(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: {})
    • resourceShareArn — (String)

      Specifies Amazon Resource Name (ARN) of the resource share that you want to remove resources or principals from.

    • resourceArns — (Array<String>)

      Specifies a list of Amazon Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals associated with the resource share.

    • principals — (Array<String>)

      Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.

      You can include the following values:

      • An Amazon Web Services account ID, for example: 123456789012

      • An Amazon Resource Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid

      • An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123

      • An ARN of an IAM role, for example: iam::123456789012:role/rolename

      • An ARN of an IAM user, for example: iam::123456789012user/username

      Note: Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

    • sources — (Array<String>)

      Specifies from which source accounts the service principal no longer has access to the resources in this resource share.

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:

      • resourceShareAssociations — (Array<map>)

        An array of objects with information about the updated associations for this resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share.

        • resourceShareName — (String)

          The name of the resource share.

        • associatedEntity — (String)

          The associated entity. This can be either of the following:

          • For a resource association, this is the Amazon Resource Name (ARN) of the resource.

          • For principal associations, this is one of the following:

            • The ID of an Amazon Web Services account

            • The Amazon Resource Name (ARN) of an organization in Organizations

            • The ARN of an organizational unit (OU) in Organizations

            • The ARN of an IAM role

            • The ARN of an IAM user

        • associationType — (String)

          The type of entity included in this association.

          Possible values include:
          • "PRINCIPAL"
          • "RESOURCE"
        • status — (String)

          The current status of the association.

          Possible values include:
          • "ASSOCIATING"
          • "ASSOCIATED"
          • "FAILED"
          • "DISASSOCIATING"
          • "DISASSOCIATED"
        • statusMessage — (String)

          A message about the status of the association.

        • creationTime — (Date)

          The date and time when the association was created.

        • lastUpdatedTime — (Date)

          The date and time when the association was last updated.

        • external — (Boolean)

          Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Removes a managed permission from a resource share. Permission changes take effect immediately. You can remove a managed permission from a resource share only if there are currently no resources of the relevant resource type currently attached to the resource share.

Examples:

Calling the disassociateResourceSharePermission operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  resourceShareArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.disassociateResourceSharePermission(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: {})
    • resourceShareArn — (String)

      The Amazon Resource Name (ARN) of the resource share that you want to remove the managed permission from.

    • permissionArn — (String)

      The Amazon Resource Name (ARN) of the managed permission to disassociate from the resource share. Changes to permissions take effect immediately.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • returnValue — (Boolean)

        A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Enables resource sharing within your organization in Organizations. This operation creates a service-linked role called AWSServiceRoleForResourceAccessManager that has the IAM managed policy named AWSResourceAccessManagerServiceRolePolicy attached. This role permits RAM to retrieve information about the organization and its structure. This lets you share resources with all of the accounts in the calling account's organization by specifying the organization ID, or all of the accounts in an organizational unit (OU) by specifying the OU ID. Until you enable sharing within the organization, you can specify only individual Amazon Web Services accounts, or for supported resource types, IAM roles and users.

You must call this operation from an IAM role or user in the organization's management account.

Examples:

Calling the enableSharingWithAwsOrganization operation

var params = {
};
ram.enableSharingWithAwsOrganization(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: {})

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:

      • returnValue — (Boolean)

        A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

Returns:

  • (AWS.Request)

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

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

Retrieves the contents of a managed permission in JSON format.

Service Reference:

Examples:

Calling the getPermission operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  permissionVersion: 'NUMBER_VALUE'
};
ram.getPermission(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.

    • permissionVersion — (Integer)

      Specifies the version number of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.

      To see the list of available versions, use ListPermissionVersions.

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:

      • permission — (map)

        An object with details about the permission.

        • arn — (String)

          The Amazon Resource Name (ARN) of this RAM managed permission.

        • version — (String)

          The version of the permission described in this response.

        • defaultVersion — (Boolean)

          Specifies whether the version of the permission represented in this response is the default version for this permission.

        • name — (String)

          The name of this permission.

        • resourceType — (String)

          The resource type to which this permission applies.

        • permission — (String)

          The permission's effect and actions in JSON format. The effect indicates whether the specified actions are allowed or denied. The actions list the operations to which the principal is granted or denied access.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the version of the permission represented in this response is the default version for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • status — (String)

          The current status of the association between the permission and the resource share. The following are the possible values:

          • ATTACHABLE – This permission or version can be associated with resource shares.

          • UNATTACHABLE – This permission or version can't currently be associated with resource shares.

          • DELETING – This permission or version is in the process of being deleted.

          • DELETED – This permission or version is deleted.

          Possible values include:
          • "ATTACHABLE"
          • "UNATTACHABLE"
          • "DELETING"
          • "DELETED"
        • tags — (Array<map>)

          The tag key and value pairs attached to the resource share.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

Returns:

  • (AWS.Request)

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

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

Retrieves the resource policies for the specified resources that you own and have shared.

Service Reference:

Examples:

Calling the getResourcePolicies operation

var params = {
  resourceArns: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  principal: 'STRING_VALUE'
};
ram.getResourcePolicies(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: {})
    • resourceArns — (Array<String>)

      Specifies the Amazon Resource Names (ARNs) of the resources whose policies you want to retrieve.

    • principal — (String)

      Specifies the principal.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • policies — (Array<String>)

        An array of resource policy documents in JSON format.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Retrieves the lists of resources and principals that associated for resource shares that you own.

Service Reference:

Examples:

Calling the getResourceShareAssociations operation

var params = {
  associationType: PRINCIPAL | RESOURCE, /* required */
  associationStatus: ASSOCIATING | ASSOCIATED | FAILED | DISASSOCIATING | DISASSOCIATED,
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  principal: 'STRING_VALUE',
  resourceArn: 'STRING_VALUE',
  resourceShareArns: [
    'STRING_VALUE',
    /* more items */
  ]
};
ram.getResourceShareAssociations(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: {})
    • associationType — (String)

      Specifies whether you want to retrieve the associations that involve a specified resource or principal.

      • PRINCIPAL – list the principals whose associations you want to see.

      • RESOURCE – list the resources whose associations you want to see.

      Possible values include:
      • "PRINCIPAL"
      • "RESOURCE"
    • resourceShareArns — (Array<String>)

      Specifies a list of Amazon Resource Names (ARNs) of the resource share whose associations you want to retrieve.

    • resourceArn — (String)

      Specifies the Amazon Resource Name (ARN) of a resource whose resource shares you want to retrieve.

      You cannot specify this parameter if the association type is PRINCIPAL.

    • principal — (String)

      Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the Amazon Resource Name (ARN) of an individual IAM role or user.

      You cannot specify this parameter if the association type is RESOURCE.

    • associationStatus — (String)

      Specifies that you want to retrieve only associations that have this status.

      Possible values include:
      • "ASSOCIATING"
      • "ASSOCIATED"
      • "FAILED"
      • "DISASSOCIATING"
      • "DISASSOCIATED"
    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • resourceShareAssociations — (Array<map>)

        An array of objects that contain the details about the associations.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share.

        • resourceShareName — (String)

          The name of the resource share.

        • associatedEntity — (String)

          The associated entity. This can be either of the following:

          • For a resource association, this is the Amazon Resource Name (ARN) of the resource.

          • For principal associations, this is one of the following:

            • The ID of an Amazon Web Services account

            • The Amazon Resource Name (ARN) of an organization in Organizations

            • The ARN of an organizational unit (OU) in Organizations

            • The ARN of an IAM role

            • The ARN of an IAM user

        • associationType — (String)

          The type of entity included in this association.

          Possible values include:
          • "PRINCIPAL"
          • "RESOURCE"
        • status — (String)

          The current status of the association.

          Possible values include:
          • "ASSOCIATING"
          • "ASSOCIATED"
          • "FAILED"
          • "DISASSOCIATING"
          • "DISASSOCIATED"
        • statusMessage — (String)

          A message about the status of the association.

        • creationTime — (Date)

          The date and time when the association was created.

        • lastUpdatedTime — (Date)

          The date and time when the association was last updated.

        • external — (Boolean)

          Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Retrieves details about invitations that you have received for resource shares.

Service Reference:

Examples:

Calling the getResourceShareInvitations operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  resourceShareArns: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceShareInvitationArns: [
    'STRING_VALUE',
    /* more items */
  ]
};
ram.getResourceShareInvitations(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: {})
    • resourceShareInvitationArns — (Array<String>)

      Specifies the Amazon Resource Names (ARNs) of the resource share invitations you want information about.

    • resourceShareArns — (Array<String>)

      Specifies that you want details about invitations only for the resource shares described by this list of Amazon Resource Names (ARNs)

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • resourceShareInvitations — (Array<map>)

        An array of objects that contain the details about the invitations.

        • resourceShareInvitationArn — (String)

          The Amazon Resource Name (ARN) of the invitation.

        • resourceShareName — (String)

          The name of the resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share

        • senderAccountId — (String)

          The ID of the Amazon Web Services account that sent the invitation.

        • receiverAccountId — (String)

          The ID of the Amazon Web Services account that received the invitation.

        • invitationTimestamp — (Date)

          The date and time when the invitation was sent.

        • status — (String)

          The current status of the invitation.

          Possible values include:
          • "PENDING"
          • "ACCEPTED"
          • "REJECTED"
          • "EXPIRED"
        • resourceShareAssociations — (Array<map>)

          To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources.

          • resourceShareArn — (String)

            The Amazon Resource Name (ARN) of the resource share.

          • resourceShareName — (String)

            The name of the resource share.

          • associatedEntity — (String)

            The associated entity. This can be either of the following:

            • For a resource association, this is the Amazon Resource Name (ARN) of the resource.

            • For principal associations, this is one of the following:

              • The ID of an Amazon Web Services account

              • The Amazon Resource Name (ARN) of an organization in Organizations

              • The ARN of an organizational unit (OU) in Organizations

              • The ARN of an IAM role

              • The ARN of an IAM user

          • associationType — (String)

            The type of entity included in this association.

            Possible values include:
            • "PRINCIPAL"
            • "RESOURCE"
          • status — (String)

            The current status of the association.

            Possible values include:
            • "ASSOCIATING"
            • "ASSOCIATED"
            • "FAILED"
            • "DISASSOCIATING"
            • "DISASSOCIATED"
          • statusMessage — (String)

            A message about the status of the association.

          • creationTime — (Date)

            The date and time when the association was created.

          • lastUpdatedTime — (Date)

            The date and time when the association was last updated.

          • external — (Boolean)

            Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

        • receiverArn — (String)

          The Amazon Resource Name (ARN) of the IAM user or role that received the invitation.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Retrieves details about the resource shares that you own or that are shared with you.

Service Reference:

Examples:

Calling the getResourceShares operation

var params = {
  resourceOwner: SELF | OTHER-ACCOUNTS, /* required */
  maxResults: 'NUMBER_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE',
  permissionArn: 'STRING_VALUE',
  permissionVersion: 'NUMBER_VALUE',
  resourceShareArns: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceShareStatus: PENDING | ACTIVE | FAILED | DELETING | DELETED,
  tagFilters: [
    {
      tagKey: 'STRING_VALUE',
      tagValues: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ]
};
ram.getResourceShares(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: {})
    • resourceShareArns — (Array<String>)

      Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.

    • resourceShareStatus — (String)

      Specifies that you want to retrieve details of only those resource shares that have this status.

      Possible values include:
      • "PENDING"
      • "ACTIVE"
      • "FAILED"
      • "DELETING"
      • "DELETED"
    • resourceOwner — (String)

      Specifies that you want to retrieve details of only those resource shares that match the following:

      • SELF – resource shares that your account shares with other accounts

      • OTHER-ACCOUNTS – resource shares that other accounts share with your account

      Possible values include:
      • "SELF"
      • "OTHER-ACCOUNTS"
    • name — (String)

      Specifies the name of an individual resource share that you want to retrieve details about.

    • tagFilters — (Array<map>)

      Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.

      • tagKey — (String)

        The tag key. This must have a valid string value and can't be empty.

      • tagValues — (Array<String>)

        A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

    • permissionArn — (String)

      Specifies that you want to retrieve details of only those resource shares that use the managed permission with this Amazon Resource Name (ARN).

    • permissionVersion — (Integer)

      Specifies that you want to retrieve details for only those resource shares that use the specified version of the managed permission.

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:

      • resourceShares — (Array<map>)

        An array of objects that contain the information about the resource shares.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share

        • name — (String)

          The name of the resource share.

        • owningAccountId — (String)

          The ID of the Amazon Web Services account that owns the resource share.

        • allowExternalPrincipals — (Boolean)

          Indicates whether principals outside your organization in Organizations can be associated with a resource share.

          • True – the resource share can be shared with any Amazon Web Services account.

          • False – the resource share can be shared with only accounts in the same organization as the account that owns the resource share.

        • status — (String)

          The current status of the resource share.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "FAILED"
          • "DELETING"
          • "DELETED"
        • statusMessage — (String)

          A message about the status of the resource share.

        • tags — (Array<map>)

          The tag key and value pairs attached to the resource share.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

        • creationTime — (Date)

          The date and time when the resource share was created.

        • lastUpdatedTime — (Date)

          The date and time when the resource share was last updated.

        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists the resources in a resource share that is shared with you but for which the invitation is still PENDING. That means that you haven't accepted or rejected the invitation and the invitation hasn't expired.

Service Reference:

Examples:

Calling the listPendingInvitationResources operation

var params = {
  resourceShareInvitationArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  resourceRegionScope: ALL | REGIONAL | GLOBAL
};
ram.listPendingInvitationResources(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: {})
    • resourceShareInvitationArn — (String)

      Specifies the Amazon Resource Name (ARN) of the invitation. You can use GetResourceShareInvitations to find the ARN of the invitation.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

    • resourceRegionScope — (String)

      Specifies that you want the results to include only resources that have the specified scope.

      • ALL – the results include both global and regional resources or resource types.

      • GLOBAL – the results include only global resources or resource types.

      • REGIONAL – the results include only regional resources or resource types.

      The default value is ALL.

      Possible values include:
      • "ALL"
      • "REGIONAL"
      • "GLOBAL"

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:

      • resources — (Array<map>)

        An array of objects that contain the information about the resources included the specified resource share.

        • arn — (String)

          The Amazon Resource Name (ARN) of the resource.

        • type — (String)

          The resource type. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share this resource is associated with.

        • resourceGroupArn — (String)

          The Amazon Resource Name (ARN) of the resource group. This value is available only if the resource is part of a resource group.

        • status — (String)

          The current status of the resource.

          Possible values include:
          • "AVAILABLE"
          • "ZONAL_RESOURCE_INACCESSIBLE"
          • "LIMIT_EXCEEDED"
          • "UNAVAILABLE"
          • "PENDING"
        • statusMessage — (String)

          A message about the status of the resource.

        • creationTime — (Date)

          The date and time when the resource was associated with the resource share.

        • lastUpdatedTime — (Date)

          The date an time when the association between the resource and the resource share was last updated.

        • resourceRegionScope — (String)

          Specifies the scope of visibility of this resource:

          • REGIONAL – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.

          • GLOBAL – The resource can be accessed from any Amazon Web Services Region.

          Possible values include:
          • "REGIONAL"
          • "GLOBAL"
      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists information about the managed permission and its associations to any resource shares that use this managed permission. This lets you see which resource shares use which versions of the specified managed permission.

Service Reference:

Examples:

Calling the listPermissionAssociations operation

var params = {
  associationStatus: ASSOCIATING | ASSOCIATED | FAILED | DISASSOCIATING | DISASSOCIATED,
  defaultVersion: true || false,
  featureSet: CREATED_FROM_POLICY | PROMOTING_TO_STANDARD | STANDARD,
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  permissionArn: 'STRING_VALUE',
  permissionVersion: 'NUMBER_VALUE',
  resourceType: 'STRING_VALUE'
};
ram.listPermissionAssociations(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the managed permission.

    • permissionVersion — (Integer)

      Specifies that you want to list only those associations with resource shares that use this version of the managed permission. If you don't provide a value for this parameter, then the operation returns information about associations with resource shares that use any version of the managed permission.

    • associationStatus — (String)

      Specifies that you want to list only those associations with resource shares that match this status.

      Possible values include:
      • "ASSOCIATING"
      • "ASSOCIATED"
      • "FAILED"
      • "DISASSOCIATING"
      • "DISASSOCIATED"
    • resourceType — (String)

      Specifies that you want to list only those associations with resource shares that include at least one resource of this resource type.

    • featureSet — (String)

      Specifies that you want to list only those associations with resource shares that have a featureSet with this value.

      Possible values include:
      • "CREATED_FROM_POLICY"
      • "PROMOTING_TO_STANDARD"
      • "STANDARD"
    • defaultVersion — (Boolean)

      When true, specifies that you want to list only those associations with resource shares that use the default version of the specified managed permission.

      When false (the default value), lists associations with resource shares that use any version of the specified managed permission.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • permissions — (Array<map>)

        A structure with information about this customer managed permission.

        • arn — (String)

          The Amazon Resource Name (ARN) of the associated managed permission.

        • permissionVersion — (String)

          The version of the permission currently associated with the resource share.

        • defaultVersion — (Boolean)

          Indicates whether the associated resource share is using the default version of the permission.

        • resourceType — (String)

          The resource type to which this permission applies.

        • status — (String)

          The current status of the association between the permission and the resource share. The following are the possible values:

          • ATTACHABLE – This permission or version can be associated with resource shares.

          • UNATTACHABLE – This permission or version can't currently be associated with resource shares.

          • DELETING – This permission or version is in the process of being deleted.

          • DELETED – This permission or version is deleted.

        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • lastUpdatedTime — (Date)

          The date and time when the association between the permission and the resource share was last updated.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of a resource share associated with this permission.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Retrieves a list of available RAM permissions that you can use for the supported resource types.

Service Reference:

Examples:

Calling the listPermissions operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  permissionType: ALL | AWS_MANAGED | CUSTOMER_MANAGED,
  resourceType: 'STRING_VALUE'
};
ram.listPermissions(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: {})
    • resourceType — (String)

      Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.

      For example, to list only permissions that apply to Amazon EC2 subnets, specify ec2:subnet. You can use the ListResourceTypes operation to get the specific string required.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

    • permissionType — (String)

      Specifies that you want to list only permissions of this type:

      • AWS – returns only Amazon Web Services managed permissions.

      • LOCAL – returns only customer managed permissions

      • ALL – returns both Amazon Web Services managed permissions and customer managed permissions.

      If you don't specify this parameter, the default is All.

      Possible values include:
      • "ALL"
      • "AWS_MANAGED"
      • "CUSTOMER_MANAGED"

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:

      • permissions — (Array<map>)

        An array of objects with information about the permissions.

        • arn — (String)

          The Amazon Resource Name (ARN) of the permission you want information about.

        • version — (String)

          The version of the permission associated with this resource share.

        • defaultVersion — (Boolean)

          Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.

        • name — (String)

          The name of this managed permission.

        • resourceType — (String)

          The type of resource to which this permission applies. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • status — (String)

          The current status of the permission.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the managed permission associated with this resource share is the default managed permission for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • tags — (Array<map>)

          A list of the tag key value pairs currently attached to the permission.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists the available versions of the specified RAM permission.

Service Reference:

Examples:

Calling the listPermissionVersions operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
ram.listPermissionVersions(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the RAM permission whose versions you want to list. You can use the permissionVersion parameter on the AssociateResourceSharePermission operation to specify a non-default version to attach.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • permissions — (Array<map>)

        An array of objects that contain details for each of the available versions.

        • arn — (String)

          The Amazon Resource Name (ARN) of the permission you want information about.

        • version — (String)

          The version of the permission associated with this resource share.

        • defaultVersion — (Boolean)

          Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.

        • name — (String)

          The name of this managed permission.

        • resourceType — (String)

          The type of resource to which this permission applies. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • status — (String)

          The current status of the permission.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the managed permission associated with this resource share is the default managed permission for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • tags — (Array<map>)

          A list of the tag key value pairs currently attached to the permission.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists the principals that you are sharing resources with or that are sharing resources with you.

Service Reference:

Examples:

Calling the listPrincipals operation

var params = {
  resourceOwner: SELF | OTHER-ACCOUNTS, /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  principals: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceArn: 'STRING_VALUE',
  resourceShareArns: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceType: 'STRING_VALUE'
};
ram.listPrincipals(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: {})
    • resourceOwner — (String)

      Specifies that you want to list information for only resource shares that match the following:

      • SELF – principals that your account is sharing resources with

      • OTHER-ACCOUNTS – principals that are sharing resources with your account

      Possible values include:
      • "SELF"
      • "OTHER-ACCOUNTS"
    • resourceArn — (String)

      Specifies that you want to list principal information for the resource share with the specified Amazon Resource Name (ARN).

    • principals — (Array<String>)

      Specifies that you want to list information for only the listed principals.

      You can include the following values:

      • An Amazon Web Services account ID, for example: 123456789012

      • An Amazon Resource Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid

      • An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123

      • An ARN of an IAM role, for example: iam::123456789012:role/rolename

      • An ARN of an IAM user, for example: iam::123456789012user/username

      Note: Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
    • resourceType — (String)

      Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.

      For a list of valid values, query the ListResourceTypes operation.

    • resourceShareArns — (Array<String>)

      Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs).

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • principals — (Array<map>)

        An array of objects that contain the details about the principals.

        • id — (String)

          The ID of the principal that can be associated with a resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of a resource share the principal is associated with.

        • creationTime — (Date)

          The date and time when the principal was associated with the resource share.

        • lastUpdatedTime — (Date)

          The date and time when the association between the resource share and the principal was last updated.

        • external — (Boolean)

          Indicates the relationship between the Amazon Web Services account the principal belongs to and the account that owns the resource share:

          • True – The two accounts belong to same organization.

          • False – The two accounts do not belong to the same organization.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Retrieves the current status of the asynchronous tasks performed by RAM when you perform the ReplacePermissionAssociationsWork operation.

Examples:

Calling the listReplacePermissionAssociationsWork operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  status: IN_PROGRESS | COMPLETED | FAILED,
  workIds: [
    'STRING_VALUE',
    /* more items */
  ]
};
ram.listReplacePermissionAssociationsWork(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: {})
    • workIds — (Array<String>)

      A list of IDs. These values come from the idfield of the replacePermissionAssociationsWorkstructure returned by the ReplacePermissionAssociations operation.

    • status — (String)

      Specifies that you want to see only the details about requests with a status that matches this value.

      Possible values include:
      • "IN_PROGRESS"
      • "COMPLETED"
      • "FAILED"
    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • replacePermissionAssociationsWorks — (Array<map>)

        An array of data structures that provide details of the matching work IDs.

        • id — (String)

          The unique identifier for the background task associated with one ReplacePermissionAssociations request.

        • fromPermissionArn — (String)

          The Amazon Resource Name (ARN) of the managed permission that this background task is replacing.

        • fromPermissionVersion — (String)

          The version of the managed permission that this background task is replacing.

        • toPermissionArn — (String)

          The ARN of the managed permission that this background task is associating with the resource shares in place of the managed permission and version specified in fromPermissionArn and fromPermissionVersion.

        • toPermissionVersion — (String)

          The version of the managed permission that this background task is associating with the resource shares. This is always the version that is currently the default for this managed permission.

        • status — (String)

          Specifies the current status of the background tasks for the specified ID. The output is one of the following strings:

          • IN_PROGRESS

          • COMPLETED

          • FAILED

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
        • statusMessage — (String)

          Specifies the reason for a FAILED status. This field is present only when there status is FAILED.

        • creationTime — (Date)

          The date and time when this asynchronous background task was created.

        • lastUpdatedTime — (Date)

          The date and time when the status of this background task was last updated.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists the resources that you added to a resource share or the resources that are shared with you.

Service Reference:

Examples:

Calling the listResources operation

var params = {
  resourceOwner: SELF | OTHER-ACCOUNTS, /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  principal: 'STRING_VALUE',
  resourceArns: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceRegionScope: ALL | REGIONAL | GLOBAL,
  resourceShareArns: [
    'STRING_VALUE',
    /* more items */
  ],
  resourceType: 'STRING_VALUE'
};
ram.listResources(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: {})
    • resourceOwner — (String)

      Specifies that you want to list only the resource shares that match the following:

      • SELF – resources that your account shares with other accounts

      • OTHER-ACCOUNTS – resources that other accounts share with your account

      Possible values include:
      • "SELF"
      • "OTHER-ACCOUNTS"
    • principal — (String)

      Specifies that you want to list only the resource shares that are associated with the specified principal.

    • resourceType — (String)

      Specifies that you want to list only the resource shares that include resources of the specified resource type.

      For valid values, query the ListResourceTypes operation.

    • resourceArns — (Array<String>)

      Specifies that you want to list only the resource shares that include resources with the specified Amazon Resource Names (ARNs).

    • resourceShareArns — (Array<String>)

      Specifies that you want to list only resources in the resource shares identified by the specified Amazon Resource Names (ARNs).

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

    • resourceRegionScope — (String)

      Specifies that you want the results to include only resources that have the specified scope.

      • ALL – the results include both global and regional resources or resource types.

      • GLOBAL – the results include only global resources or resource types.

      • REGIONAL – the results include only regional resources or resource types.

      The default value is ALL.

      Possible values include:
      • "ALL"
      • "REGIONAL"
      • "GLOBAL"

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:

      • resources — (Array<map>)

        An array of objects that contain information about the resources.

        • arn — (String)

          The Amazon Resource Name (ARN) of the resource.

        • type — (String)

          The resource type. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share this resource is associated with.

        • resourceGroupArn — (String)

          The Amazon Resource Name (ARN) of the resource group. This value is available only if the resource is part of a resource group.

        • status — (String)

          The current status of the resource.

          Possible values include:
          • "AVAILABLE"
          • "ZONAL_RESOURCE_INACCESSIBLE"
          • "LIMIT_EXCEEDED"
          • "UNAVAILABLE"
          • "PENDING"
        • statusMessage — (String)

          A message about the status of the resource.

        • creationTime — (Date)

          The date and time when the resource was associated with the resource share.

        • lastUpdatedTime — (Date)

          The date an time when the association between the resource and the resource share was last updated.

        • resourceRegionScope — (String)

          Specifies the scope of visibility of this resource:

          • REGIONAL – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.

          • GLOBAL – The resource can be accessed from any Amazon Web Services Region.

          Possible values include:
          • "REGIONAL"
          • "GLOBAL"
      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists the RAM permissions that are associated with a resource share.

Service Reference:

Examples:

Calling the listResourceSharePermissions operation

var params = {
  resourceShareArn: 'STRING_VALUE', /* required */
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
ram.listResourceSharePermissions(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share for which you want to retrieve the associated permissions.

    • nextToken — (String)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

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:

      • permissions — (Array<map>)

        An array of objects that describe the permissions associated with the resource share.

        • arn — (String)

          The Amazon Resource Name (ARN) of the permission you want information about.

        • version — (String)

          The version of the permission associated with this resource share.

        • defaultVersion — (Boolean)

          Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.

        • name — (String)

          The name of this managed permission.

        • resourceType — (String)

          The type of resource to which this permission applies. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • status — (String)

          The current status of the permission.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the managed permission associated with this resource share is the default managed permission for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • tags — (Array<map>)

          A list of the tag key value pairs currently attached to the permission.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

Lists the resource types that can be shared by RAM.

Service Reference:

Examples:

Calling the listResourceTypes operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  resourceRegionScope: ALL | REGIONAL | GLOBAL
};
ram.listResourceTypes(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)

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

    • maxResults — (Integer)

      Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

    • resourceRegionScope — (String)

      Specifies that you want the results to include only resources that have the specified scope.

      • ALL – the results include both global and regional resources or resource types.

      • GLOBAL – the results include only global resources or resource types.

      • REGIONAL – the results include only regional resources or resource types.

      The default value is ALL.

      Possible values include:
      • "ALL"
      • "REGIONAL"
      • "GLOBAL"

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:

      • resourceTypes — (Array<map>)

        An array of objects that contain information about the resource types that can be shared using RAM.

        • resourceType — (String)

          The type of the resource. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • serviceName — (String)

          The name of the Amazon Web Services service to which resources of this type belong.

        • resourceRegionScope — (String)

          Specifies the scope of visibility of resources of this type:

          • REGIONAL – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.

          • GLOBAL – The resource can be accessed from any Amazon Web Services Region.

          Possible values include:
          • "REGIONAL"
          • "GLOBAL"
      • nextToken — (String)

        If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

Returns:

  • (AWS.Request)

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

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

When you attach a resource-based policy to a resource, RAM automatically creates a resource share of featureSet=CREATED_FROM_POLICY with a managed permission that has the same IAM permissions as the original resource-based policy. However, this type of managed permission is visible to only the resource share owner, and the associated resource share can't be modified by using RAM.

This operation creates a separate, fully manageable customer managed permission that has the same IAM permissions as the original resource-based policy. You can associate this customer managed permission to any resource shares.

Before you use PromoteResourceShareCreatedFromPolicy, you should first run this operation to ensure that you have an appropriate customer managed permission that can be associated with the promoted resource share.

Note:
  • The original CREATED_FROM_POLICY policy isn't deleted, and resource shares using that original policy aren't automatically updated.
  • You can't modify a CREATED_FROM_POLICY resource share so you can't associate the new customer managed permission by using ReplacePermsissionAssociations. However, if you use PromoteResourceShareCreatedFromPolicy, that operation automatically associates the fully manageable customer managed permission to the newly promoted STANDARD resource share.
  • After you promote a resource share, if the original CREATED_FROM_POLICY managed permission has no other associations to A resource share, then RAM automatically deletes it.

Examples:

Calling the promotePermissionCreatedFromPolicy operation

var params = {
  name: 'STRING_VALUE', /* required */
  permissionArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.promotePermissionCreatedFromPolicy(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the CREATED_FROM_POLICY permission that you want to promote. You can get this Amazon Resource Name (ARN) by calling the ListResourceSharePermissions operation.

    • name — (String)

      Specifies a name for the promoted customer managed permission.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • permission — (map)

        Information about an RAM permission.

        • arn — (String)

          The Amazon Resource Name (ARN) of the permission you want information about.

        • version — (String)

          The version of the permission associated with this resource share.

        • defaultVersion — (Boolean)

          Specifies whether the version of the managed permission used by this resource share is the default version for this managed permission.

        • name — (String)

          The name of this managed permission.

        • resourceType — (String)

          The type of resource to which this permission applies. This takes the form of: service-code:resource-code, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string ec2:subnet.

        • status — (String)

          The current status of the permission.

        • creationTime — (Date)

          The date and time when the permission was created.

        • lastUpdatedTime — (Date)

          The date and time when the permission was last updated.

        • isResourceTypeDefault — (Boolean)

          Specifies whether the managed permission associated with this resource share is the default managed permission for all resources of this resource type.

        • permissionType — (String)

          The type of managed permission. This can be one of the following values:

          • AWS_MANAGED – Amazon Web Services created and manages this managed permission. You can associate it with your resource shares, but you can't modify it.

          • CUSTOMER_MANAGED – You, or another principal in your account created this managed permission. You can associate it with your resource shares and create new versions that have different permissions.

          Possible values include:
          • "CUSTOMER_MANAGED"
          • "AWS_MANAGED"
        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
        • tags — (Array<map>)

          A list of the tag key value pairs currently attached to the permission.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

When you attach a resource-based policy to a resource, RAM automatically creates a resource share of featureSet=CREATED_FROM_POLICY with a managed permission that has the same IAM permissions as the original resource-based policy. However, this type of managed permission is visible to only the resource share owner, and the associated resource share can't be modified by using RAM.

This operation promotes the resource share to a STANDARD resource share that is fully manageable in RAM. When you promote a resource share, you can then manage the resource share in RAM and it becomes visible to all of the principals you shared it with.

Before you perform this operation, you should first run PromotePermissionCreatedFromPolicyto ensure that you have an appropriate customer managed permission that can be associated with this resource share after its is promoted. If this operation can't find a managed permission that exactly matches the existing CREATED_FROM_POLICY permission, then this operation fails.

Examples:

Calling the promoteResourceShareCreatedFromPolicy operation

var params = {
  resourceShareArn: 'STRING_VALUE' /* required */
};
ram.promoteResourceShareCreatedFromPolicy(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: {})

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:

      • returnValue — (Boolean)

        A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

Returns:

  • (AWS.Request)

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

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

Rejects an invitation to a resource share from another Amazon Web Services account.

Service Reference:

Examples:

Calling the rejectResourceShareInvitation operation

var params = {
  resourceShareInvitationArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.rejectResourceShareInvitation(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: {})
    • resourceShareInvitationArn — (String)

      Specifies the Amazon Resource Name (ARN) of the invitation that you want to reject.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • resourceShareInvitation — (map)

        An object that contains the details about the rejected invitation.

        • resourceShareInvitationArn — (String)

          The Amazon Resource Name (ARN) of the invitation.

        • resourceShareName — (String)

          The name of the resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share

        • senderAccountId — (String)

          The ID of the Amazon Web Services account that sent the invitation.

        • receiverAccountId — (String)

          The ID of the Amazon Web Services account that received the invitation.

        • invitationTimestamp — (Date)

          The date and time when the invitation was sent.

        • status — (String)

          The current status of the invitation.

          Possible values include:
          • "PENDING"
          • "ACCEPTED"
          • "REJECTED"
          • "EXPIRED"
        • resourceShareAssociations — (Array<map>)

          To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources.

          • resourceShareArn — (String)

            The Amazon Resource Name (ARN) of the resource share.

          • resourceShareName — (String)

            The name of the resource share.

          • associatedEntity — (String)

            The associated entity. This can be either of the following:

            • For a resource association, this is the Amazon Resource Name (ARN) of the resource.

            • For principal associations, this is one of the following:

              • The ID of an Amazon Web Services account

              • The Amazon Resource Name (ARN) of an organization in Organizations

              • The ARN of an organizational unit (OU) in Organizations

              • The ARN of an IAM role

              • The ARN of an IAM user

          • associationType — (String)

            The type of entity included in this association.

            Possible values include:
            • "PRINCIPAL"
            • "RESOURCE"
          • status — (String)

            The current status of the association.

            Possible values include:
            • "ASSOCIATING"
            • "ASSOCIATED"
            • "FAILED"
            • "DISASSOCIATING"
            • "DISASSOCIATED"
          • statusMessage — (String)

            A message about the status of the association.

          • creationTime — (Date)

            The date and time when the association was created.

          • lastUpdatedTime — (Date)

            The date and time when the association was last updated.

          • external — (Boolean)

            Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.

        • receiverArn — (String)

          The Amazon Resource Name (ARN) of the IAM user or role that received the invitation.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Updates all resource shares that use a managed permission to a different managed permission. This operation always applies the default version of the target managed permission. You can optionally specify that the update applies to only resource shares that currently use a specified version. This enables you to update to the latest version, without changing the which managed permission is used.

You can use this operation to update all of your resource shares to use the current default version of the permission by specifying the same value for the fromPermissionArn and toPermissionArn parameters.

You can use the optional fromPermissionVersion parameter to update only those resources that use a specified version of the managed permission to the new managed permission.

To successfully perform this operation, you must have permission to update the resource-based policy on all affected resource types.

Service Reference:

Examples:

Calling the replacePermissionAssociations operation

var params = {
  fromPermissionArn: 'STRING_VALUE', /* required */
  toPermissionArn: 'STRING_VALUE', /* required */
  clientToken: 'STRING_VALUE',
  fromPermissionVersion: 'NUMBER_VALUE'
};
ram.replacePermissionAssociations(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: {})
    • fromPermissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the managed permission that you want to replace.

    • fromPermissionVersion — (Integer)

      Specifies that you want to updated the permissions for only those resource shares that use the specified version of the managed permission.

    • toPermissionArn — (String)

      Specifies the ARN of the managed permission that you want to associate with resource shares in place of the one specified by fromPerssionArn and fromPermissionVersion.

      The operation always associates the version that is currently the default for the specified managed permission.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • replacePermissionAssociationsWork — (map)

        Specifies a data structure that you can use to track the asynchronous tasks that RAM performs to complete this operation. You can use the ListReplacePermissionAssociationsWork operation and pass the id value returned in this structure.

        • id — (String)

          The unique identifier for the background task associated with one ReplacePermissionAssociations request.

        • fromPermissionArn — (String)

          The Amazon Resource Name (ARN) of the managed permission that this background task is replacing.

        • fromPermissionVersion — (String)

          The version of the managed permission that this background task is replacing.

        • toPermissionArn — (String)

          The ARN of the managed permission that this background task is associating with the resource shares in place of the managed permission and version specified in fromPermissionArn and fromPermissionVersion.

        • toPermissionVersion — (String)

          The version of the managed permission that this background task is associating with the resource shares. This is always the version that is currently the default for this managed permission.

        • status — (String)

          Specifies the current status of the background tasks for the specified ID. The output is one of the following strings:

          • IN_PROGRESS

          • COMPLETED

          • FAILED

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "FAILED"
        • statusMessage — (String)

          Specifies the reason for a FAILED status. This field is present only when there status is FAILED.

        • creationTime — (Date)

          The date and time when this asynchronous background task was created.

        • lastUpdatedTime — (Date)

          The date and time when the status of this background task was last updated.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Designates the specified version number as the default version for the specified customer managed permission. New resource shares automatically use this new default permission. Existing resource shares continue to use their original permission version, but you can use ReplacePermissionAssociations to update them.

Service Reference:

Examples:

Calling the setDefaultPermissionVersion operation

var params = {
  permissionArn: 'STRING_VALUE', /* required */
  permissionVersion: 'NUMBER_VALUE', /* required */
  clientToken: 'STRING_VALUE'
};
ram.setDefaultPermissionVersion(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: {})
    • permissionArn — (String)

      Specifies the Amazon Resource Name (ARN) of the customer managed permission whose default version you want to change.

    • permissionVersion — (Integer)

      Specifies the version number that you want to designate as the default for customer managed permission. To see a list of all available version numbers, use ListPermissionVersions.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • returnValue — (Boolean)

        A boolean value that indicates whether the operation was successful.

      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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

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

Adds the specified tag keys and values to a resource share or managed permission. If you choose a resource share, the tags are attached to only the resource share, not to the resources that are in the resource share.

The tags on a managed permission are the same for all versions of the managed permission.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  tags: [ /* required */
    {
      key: 'STRING_VALUE',
      value: 'STRING_VALUE'
    },
    /* more items */
  ],
  resourceArn: 'STRING_VALUE',
  resourceShareArn: 'STRING_VALUE'
};
ram.tagResource(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share that you want to add tags to. You must specify either resourceShareArn, or resourceArn, but not both.

    • tags — (Array<map>)

      A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.

      • key — (String)

        The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

      • value — (String)

        The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

    • resourceArn — (String)

      Specifies the Amazon Resource Name (ARN) of the managed permission that you want to add tags to. You must specify either resourceArn, or resourceShareArn, but not both.

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.

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

Removes the specified tag key and value pairs from the specified resource share or managed permission.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  resourceArn: 'STRING_VALUE',
  resourceShareArn: 'STRING_VALUE'
};
ram.untagResource(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share. You must specify either resourceShareArn, or resourceArn, but not both.

    • tagKeys — (Array<String>)

      Specifies a list of one or more tag keys that you want to remove.

    • resourceArn — (String)

      Specifies the Amazon Resource Name (ARN) of the managed permission that you want to remove tags from. You must specify either resourceArn, or resourceShareArn, but not both.

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.

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

Modifies some of the properties of the specified resource share.

Service Reference:

Examples:

Calling the updateResourceShare operation

var params = {
  resourceShareArn: 'STRING_VALUE', /* required */
  allowExternalPrincipals: true || false,
  clientToken: 'STRING_VALUE',
  name: 'STRING_VALUE'
};
ram.updateResourceShare(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: {})
    • resourceShareArn — (String)

      Specifies the Amazon Resource Name (ARN) of the resource share that you want to modify.

    • name — (String)

      If specified, the new name that you want to attach to the resource share.

    • allowExternalPrincipals — (Boolean)

      Specifies whether principals outside your organization in Organizations can be associated with a resource share.

    • clientToken — (String)

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don't provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.

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:

      • resourceShare — (map)

        Information about the resource share.

        • resourceShareArn — (String)

          The Amazon Resource Name (ARN) of the resource share

        • name — (String)

          The name of the resource share.

        • owningAccountId — (String)

          The ID of the Amazon Web Services account that owns the resource share.

        • allowExternalPrincipals — (Boolean)

          Indicates whether principals outside your organization in Organizations can be associated with a resource share.

          • True – the resource share can be shared with any Amazon Web Services account.

          • False – the resource share can be shared with only accounts in the same organization as the account that owns the resource share.

        • status — (String)

          The current status of the resource share.

          Possible values include:
          • "PENDING"
          • "ACTIVE"
          • "FAILED"
          • "DELETING"
          • "DELETED"
        • statusMessage — (String)

          A message about the status of the resource share.

        • tags — (Array<map>)

          The tag key and value pairs attached to the resource share.

          • key — (String)

            The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.

          • value — (String)

            The string value attached to the tag. The value can be an empty string. Key values are case sensitive.

        • creationTime — (Date)

          The date and time when the resource share was created.

        • lastUpdatedTime — (Date)

          The date and time when the resource share was last updated.

        • featureSet — (String)

          Indicates what features are available for this resource share. This parameter can have one of the following values:

          • STANDARD – A resource share that supports all functionality. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs. This resource share might have been created by RAM, or it might have been CREATED_FROM_POLICY and then promoted.

          • CREATED_FROM_POLICY – The customer manually shared a resource by attaching a resource-based policy. That policy did not match any existing managed permissions, so RAM created this customer managed permission automatically on the customer's behalf based on the attached policy document. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.

          • PROMOTING_TO_STANDARD – This resource share was originally CREATED_FROM_POLICY, but the customer ran the PromoteResourceShareCreatedFromPolicy and that operation is still in progress. This value changes to STANDARD when complete.

          Possible values include:
          • "CREATED_FROM_POLICY"
          • "PROMOTING_TO_STANDARD"
          • "STANDARD"
      • clientToken — (String)

        The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Returns:

  • (AWS.Request)

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