Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . memorydb ]

create-subnet-group

Description

Creates a subnet group. A subnet group is a collection of subnets (typically private) that you can designate for your clusters running in an Amazon Virtual Private Cloud (VPC) environment. When you create a cluster in an Amazon VPC, you must specify a subnet group. MemoryDB uses that subnet group to choose a subnet and IP addresses within that subnet to associate with your nodes. For more information, see Subnets and subnet groups .

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-subnet-group
--subnet-group-name <value>
[--description <value>]
--subnet-ids <value>
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--subnet-group-name (string)

The name of the subnet group.

--description (string)

A description for the subnet group.

--subnet-ids (list)

A list of VPC subnet IDs for the subnet group.

(string)

Syntax:

"string" "string" ...

--tags (list)

A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.

(structure)

A tag that can be added to an MemoryDB resource. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your MemoryDB resources. When you add or remove tags on clusters, those actions will be replicated to all nodes in the cluster. A tag with a null Value is permitted. For more information, see Tagging your MemoryDB resources

Key -> (string)

The key for the tag. May not be null.

Value -> (string)

The tag's value. May be null.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

SubnetGroup -> (structure)

The newly-created subnet group

Name -> (string)

The name of the subnet group

Description -> (string)

A description of the subnet group

VpcId -> (string)

The Amazon Virtual Private Cloud identifier (VPC ID) of the subnet group.

Subnets -> (list)

A list of subnets associated with the subnet group.

(structure)

Represents the subnet associated with a cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with MemoryDB.

Identifier -> (string)

The unique identifier for the subnet.

AvailabilityZone -> (structure)

The Availability Zone where the subnet resides

Name -> (string)

The name of the Availability Zone.

ARN -> (string)

The ARN (Amazon Resource Name) of the subnet group.