File: //lib/google-cloud-sdk/lib/surface/memcache/instances/create.yaml
- release_tracks: [ALPHA, BETA]
help_text:
brief: |
Create a Memorystore Memcached instance.
description: |
Create a new Memorystore Memcached instance with the given name.
This command can fail for the following reasons:
* An instance with the same name already exists.
* The active account does not have the necessary permissions to create instances.
examples: |
To create a Memcached instance named 'my-memcache-instance' in region 'us-central1'
with 3 nodes, each with 2 CPUs and 2GB of memory, run:
$ {command} my-memcache-instance --region=us-central1 \
--node-count=3 --node-cpu=2 --node-memory=2GB
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.memcache.resources:instance
help_text: |
Arguments and flags that specify the Memcached instance to create.
params:
- arg_name: display-name
api_field: instance.displayName
help_text: An arbitrary and optional user provided name for the instance.
- arg_name: labels
api_field: instance.labels.additionalProperties
metavar: KEY=VALUE
help_text: |
List of label KEY=VALUE pairs to add.
type:
arg_dict:
flatten: true
spec:
- api_field: key
- api_field: value
- arg_name: authorized-network
api_field: instance.authorizedNetwork
help_text: |
Full name of the Google Compute Engine network to which the instance
is connected. If unspecified, the default network will be used.
- arg_name: zones
api_field: instance.zones
type: "googlecloudsdk.calliope.arg_parsers:ArgList:"
help_text: |
List of zones for the memcache nodes. The nodes will be divided
equally across the given zones up to --node-count value. If not
provided, the service will by default create nodes in all zones in the
region specified by --region flag.
- arg_name: node-count
help_text: Number of memcache nodes in this instance. Valid values range from 1 to 20.
api_field: instance.nodeCount
required: true
- arg_name: node-cpu
api_field: instance.nodeConfig.cpuCount
help_text: |
Number of cpus per node in this instance. Valid values are 1 or even
number between 2-16.
required: true
# Check the range on this flag and then set it in the parser
- arg_name: node-memory
api_field: instance.nodeConfig.memorySizeMb
required: true
help_text: |
Amount of memory allocated per node in this instance. The value must be a whole number
followed by a size unit of 'MB' for megabyte, or 'GB' for gigabyte, ie '3072MB' or '9GB'.
The value must be between 1024MB and 307200MB.
default: 1024MB
type: googlecloudsdk.command_lib.memcache.instances_util:NodeMemory
- arg_name: memcached-version
api_field: instance.memcacheVersion
help_text: |
Optional major version of Memcached software to use with the instance.
If not provided, default of "1.5" will be used.
choices:
- arg_value: '1.5'
enum_value: MEMCACHE_1_5
help_text: Memcached major version 1.5
- arg_name: parameters
api_field: instance.parameters.params
metavar: KEY=VALUE
help_text: |
User defined parameters to apply to the memcached process on each node. Possible attributes include:
*listen-backlog*::: The backlog queue limit for the instance.
*disable-flush-all*::: If enabled, flush_all command will be disabled. Applicable to
1.4.24 and higher.
*max-item-size*::: Max bytes of the instnace. Must at least be equal to slab_chunk_max
(which defaults to 524288 bytes) and less than 134217728 bytes. Additionally it must
be a multiple of slab_chunk_max.
*slab-min-size*::: This is an integer in the range [1, 1024].
*slab-growth-factor*::: This is a float in the range [1.01, 100].
*protocol*::: This is an enum with acceptable values of ["ascii", "auto"].
*disable-cas*::: This is a boolean value.
*disable-evictions*::: This is a boolean value.
*max-reqs-per-event*::: This is an integer in the range [1, 1000].
*track-sizes*::: This is a boolean value.
*worker-logbuf-size*::: This is an integer in the range [48, 524288].
*watcher-logbuf-size*::: This is an integer in the range [0, 2097151].
*lru-crawler*::: This is a boolean value.
*idle-timeout*::: This is an integer in the range [1,86400].
*lru-maintainer*::: This is a boolean value.
*maxconns-fast*::: This is a boolean value.
*hash-algorithm*::: This is an enum with accepted values of ["jenkins", "murmur3"].
type: "googlecloudsdk.command_lib.memcache.instances_util:Parameters"
async:
collection: memcache.projects.locations.operations
request: &request
collection: memcache.projects.locations.instances
output:
format: yaml