gcloud beta memcache instances create Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta memcache instances create - create a Memorystore Memcached instance
- SYNOPSIS
gcloud beta memcache instances create(INSTANCE:--region=REGION)--node-count=NODE_COUNT--node-cpu=NODE_CPU--node-memory=NODE_MEMORY[--async][--authorized-network=AUTHORIZED_NETWORK][--display-name=DISPLAY_NAME][--labels=[KEY=VALUE,…]][--maintenance-window-day=MAINTENANCE_WINDOW_DAY][--maintenance-window-duration=MAINTENANCE_WINDOW_DURATION][--maintenance-window-start-time=MAINTENANCE_WINDOW_START_TIME][--memcached-version=MEMCACHED_VERSION][--parameters=KEY=VALUE][--reserved-ip-range-id=[RESERVED_IP_RANGE_ID,…]][--zones=[ZONES,…]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)Create a new Memorystore Memcached instance.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:
gcloudbetamemcacheinstancescreatemy-memcache-instance--region=us-central1--node-count=3--node-cpu=2--node-memory=2GB - POSITIONAL ARGUMENTS
- Instance resource - Arguments and flags that specify the Memcached instance tocreate. The arguments in this group can be used to specify the attributes ofthis resource. (NOTE) Some attributes are not given arguments in this group butcan be set in other ways.
To set the
projectattribute:- provide the argument
instanceon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
INSTANCE- ID of the instance or fully qualified identifier for the instance.
To set the
instanceattribute:- provide the argument
instanceon the command line.
This positional argument must be specified if any of the other arguments in thisgroup are specified.
- provide the argument
--region=REGION- The name of the Memcached region of the instance. Overrides the defaultmemcache/region property value for this command invocation.To set the
regionattribute:- provide the argument
instanceon the command line with a fullyspecified name; - provide the argument
--regionon the command line; - set the property
memcache/region.
- provide the argument
- provide the argument
- Instance resource - Arguments and flags that specify the Memcached instance tocreate. The arguments in this group can be used to specify the attributes ofthis resource. (NOTE) Some attributes are not given arguments in this group butcan be set in other ways.
- REQUIRED FLAGS
--node-count=NODE_COUNT- Number of memcache nodes in this instance. Valid values range from 1 to 20.
--node-cpu=NODE_CPU- Number of cpus per node in this instance. Valid values are 1 or even numberbetween 2-32. Value of 1 is not supported in all regions.
--node-memory=NODE_MEMORY- Amount of memory allocated per node in this instance. The value must be a wholenumber 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.
- OPTIONAL FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--authorized-network=AUTHORIZED_NETWORK- Full name of the Google Compute Engine network to which the instance isconnected. If unspecified, the default network will be used.
--display-name=DISPLAY_NAME- An arbitrary and optional user provided name for the instance.
--labels=[KEY=VALUE,…]- List of label KEY=VALUE pairs to add.
--maintenance-window-day=MAINTENANCE_WINDOW_DAY- The day of week when the window starts, e.g.
sunday.MAINTENANCE_WINDOW_DAYmust be one of:friday,monday,saturday,sunday,thursday,tuesday,wednesday. --maintenance-window-duration=MAINTENANCE_WINDOW_DURATION- Duration in integer hours (
3to8) of the maintenancewindow. --maintenance-window-start-time=MAINTENANCE_WINDOW_START_TIME- Hour of day (
0to23) for the start of maintenancewindow, in UTC time zone. --memcached-version=MEMCACHED_VERSION- Optional major version of Memcached software to use with the instance. If notprovided, default of "1.5" will be used.
MEMCACHED_VERSIONmust be one of:1.5- Memcached major version 1.5
1.6.15- Memcached version 1.6.15
--parameters=KEY=VALUE- User defined parameters to apply to the memcached process on each node. Possibleattributes 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 (whichdefaults to 524288 bytes) and less than 134217728 bytes. Additionally it must bea 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"].
--reserved-ip-range-id=[RESERVED_IP_RANGE_ID,…]- Contains the name of allocated IP address ranges associated with the privateservice access connection for example, "test-default" associated with IP range10.0.0.0/29.
--zones=[ZONES,…]- List of zones for the memcache nodes. The nodes will be divided equally acrossthe given zones up to --node-count value. If not provided, the service will bydefault create nodes in all zones in the region specified by --region flag.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - API REFERENCE
- This command uses the
memcache/v1beta2API. The full documentationfor this API can be found at:https://cloud.google.com/memorystore/ - NOTES
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudmemcacheinstancescreategcloudalphamemcacheinstancescreate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.