-
Notifications
You must be signed in to change notification settings - Fork 1.8k
memorystore open api #11463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
memorystore open api #11463
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
1db4944
memorystore open api
himanikh 91f60bf
memorystore auto generated product and resource definition
himanikh a5d4416
manual changes and basic example
himanikh 661fb11
minor fixes + example
himanikh 618a7b9
Adding update tests
himanikh 8af5bd6
adding desiredPscAutoConnections to capture user input
himanikh 4b574f0
use desired_psc_auto_connections instead of psc_auto_connections in t…
himanikh a9cf705
adding encoder decoder files
himanikh ca97ae7
Merge branch 'GoogleCloudPlatform:main' into memorystore
himanikh 7c439b4
Adding Memorystore Instance support
himanikh 3414a2f
minor fixes
himanikh e9af561
fix in decoder
himanikh 2427c15
Corrected type from string to enum
himanikh ad9ff8e
minor fix
himanikh 8b09177
minor fix
himanikh e7d1223
minor fixes
himanikh 6767f9f
minor fix
himanikh 24df9db
adding example for AOF
himanikh 033ed97
Addressing review comments
himanikh 3259768
Addressing review comments
himanikh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,275 @@ | ||
--- | ||
!ruby/object:Api::Resource | ||
base_url: "/v1beta/projects/{{project}}/locations/{{location}}/instances" | ||
create_url: "/v1beta/projects/{{project}}/locations/{{location}}/instances?instanceId={{instance_id}}" | ||
self_link: "/v1beta/projects/{{project}}/locations/{{location}}/instances/{{instance_id}}" | ||
id_format: "/v1beta/projects/{{project}}/locations/{{location}}/instances/{{instance_id}}" | ||
import_format: | ||
- "/v1beta/projects/{{project}}/locations/{{location}}/instances/{{instance_id}}" | ||
name: Instance | ||
description: A Google Cloud Memorystore instance. | ||
update_verb: :PATCH | ||
update_mask: true | ||
autogen_async: true | ||
min_version: beta | ||
examples: | ||
- !ruby/object:Provider::Terraform::Examples | ||
name: "memorystore_ha" | ||
primary_resource_id: "instance-ha" | ||
min_version: beta | ||
vars: | ||
instance_name: "ha-instance" | ||
policy_name: "mypolicy" | ||
subnet_name: "mysubnet" | ||
network_name: "mynetwork" | ||
prevent_destroy: "true" | ||
test_vars_overrides: | ||
prevent_destroy: "false" | ||
oics_vars_overrides: | ||
prevent_destroy: "false" | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: name | ||
description: "Identifier. Unique name of the instance.\nFormat: projects/{project}/locations/{location}/instances/{instance} " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: createTime | ||
description: "Output only. Creation timestamp of the instance. " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: updateTime | ||
description: "Output only. Latest update timestamp of the instance. " | ||
output: true | ||
- !ruby/object:Api::Type::KeyValueLabels | ||
name: labels | ||
output: | ||
api_name: | ||
description: "Optional. Labels to represent user-provided metadata. " | ||
min_version: | ||
ignore_write: | ||
update_verb: | ||
update_url: | ||
immutable: | ||
- !ruby/object:Api::Type::String | ||
name: state | ||
description: | ||
"Output only. Current state of the instance. \n Possible values:\n | ||
STATE_UNSPECIFIED\nCREATING\nACTIVE\nUPDATING\nDELETING" | ||
output: true | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::Integer | ||
name: targetShardCount | ||
description: "Output only. Target number of shards for the instance. " | ||
output: true | ||
- !ruby/object:Api::Type::Integer | ||
name: targetReplicaCount | ||
description: | ||
"Output only. Target number of replica nodes per shard for the | ||
instance. " | ||
output: true | ||
name: updateInfo | ||
himanikh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: "Represents information about instance with state UPDATING. " | ||
name: stateInfo | ||
description: "Additional information about the state of the instance. " | ||
- !ruby/object:Api::Type::String | ||
name: uid | ||
description: "Output only. System assigned, unique identifier for the instance. " | ||
output: true | ||
- !ruby/object:Api::Type::Integer | ||
name: replicaCount | ||
description: | ||
"Optional. Number of replica nodes per shard. If omitted the default | ||
is 0 replicas. " | ||
- !ruby/object:Api::Type::String | ||
name: authorizationMode | ||
description: | ||
"Optional. Immutable. Authorization mode of the instance. \n Possible | ||
values:\n AUTHORIZATION_MODE_UNSPECIFIED\nAUTH_DISABLED\nIAM_AUTH" | ||
immutable: true | ||
- !ruby/object:Api::Type::String | ||
name: transitEncryptionMode | ||
description: | ||
"Optional. Immutable. In-transit encryption mode of the instance. \n | ||
Possible values:\n TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\nTRANSIT_ENCRYPTION_DISABLED\nSERVER_AUTHENTICATION" | ||
immutable: true | ||
- !ruby/object:Api::Type::Integer | ||
name: shardCount | ||
description: "Required. Number of shards for the instance. " | ||
required: true | ||
- !ruby/object:Api::Type::Array | ||
name: discoveryEndpoints | ||
item_type: !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: address | ||
description: | ||
"Output only. IP address of the exposed endpoint clients connect | ||
to. " | ||
output: true | ||
- !ruby/object:Api::Type::Integer | ||
name: port | ||
description: "Output only. The port number of the exposed endpoint. " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: network | ||
description: | ||
"Output only. The network where the IP address of the discovery | ||
endpoint will be\nreserved, in the form of\nprojects/{network_project}/global/networks/{network_id}. " | ||
output: true | ||
description: | ||
"Output only. Endpoints clients can connect to the instance through. | ||
Currently only one\ndiscovery endpoint is supported. " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: nodeType | ||
description: | ||
"Optional. Immutable. Machine type for individual nodes of the instance. | ||
\n Possible values:\n NODE_TYPE_UNSPECIFIED\nSHARED_CORE_NANO\nHIGHMEM_MEDIUM\nHIGHMEM_XLARGE\nSTANDARD_SMALL" | ||
himanikh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
immutable: true | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: mode | ||
description: "Optional. Current persistence mode. \n Possible values:\n PERSISTENCE_MODE_UNSPECIFIED\nDISABLED\nRDB\nAOF" | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: rdbSnapshotPeriod | ||
description: | ||
"Optional. Period between RDB snapshots. \n Possible values:\n | ||
SNAPSHOT_PERIOD_UNSPECIFIED\nONE_HOUR\nSIX_HOURS\nTWELVE_HOURS\nTWENTY_FOUR_HOURS" | ||
- !ruby/object:Api::Type::String | ||
name: rdbSnapshotStartTime | ||
description: | ||
"Optional. Time that the first snapshot was/will be attempted, | ||
and to which future\nsnapshots will be aligned. If not provided, the current | ||
time will be\nused. " | ||
name: rdbConfig | ||
description: "Configuration for RDB based persistence. " | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: appendFsync | ||
description: "Optional. The fsync mode. \n Possible values:\n APPEND_FSYNC_UNSPECIFIED\nNEVER\nEVERY_SEC\nALWAYS" | ||
name: aofConfig | ||
description: "Configuration for AOF based persistence. " | ||
name: persistenceConfig | ||
description: "Represents persistence configuration for a instance. " | ||
- !ruby/object:Api::Type::String | ||
name: engineVersion | ||
description: "Optional. Immutable. Engine version of the instance. " | ||
immutable: true | ||
- !ruby/object:Api::Type::KeyValuePairs | ||
name: engineConfigs | ||
output: | ||
api_name: | ||
description: "Optional. User-provided engine configurations for the instance. " | ||
min_version: | ||
ignore_write: | ||
update_verb: | ||
update_url: | ||
immutable: | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::Double | ||
name: sizeGb | ||
description: "Output only. Memory size in GB of the node. " | ||
output: true | ||
name: nodeConfig | ||
description: "Represents configuration for nodes of the instance. " | ||
- !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: zone | ||
description: | ||
"Optional. Defines zone where all resources will be allocated with | ||
SINGLE_ZONE mode.\nIgnored for MULTI_ZONE mode. " | ||
- !ruby/object:Api::Type::String | ||
name: mode | ||
description: | ||
"Optional. Current zone distribution mode. Defaults to MULTI_ZONE. | ||
\n Possible values:\n ZONE_DISTRIBUTION_MODE_UNSPECIFIED\nMULTI_ZONE\nSINGLE_ZONE" | ||
name: zoneDistributionConfig | ||
description: "Zone distribution configuration for allocation of instance resources. " | ||
- !ruby/object:Api::Type::Boolean | ||
name: deletionProtectionEnabled | ||
description: "Optional. If set to true deletion of the instance will fail. " | ||
- !ruby/object:Api::Type::Array | ||
name: pscAutoConnections | ||
item_type: !ruby/object:Api::Type::NestedObject | ||
properties: | ||
- !ruby/object:Api::Type::String | ||
name: pscConnectionId | ||
description: | ||
"Output only. The PSC connection id of the forwarding rule connected | ||
to the\nservice attachment. " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: ipAddress | ||
description: | ||
"Output only. The IP allocated on the consumer network for the | ||
PSC forwarding rule. " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: forwardingRule | ||
description: "Output only. The URI of the consumer side forwarding rule.\nFormat:\nprojects/{project}/regions/{region}/forwardingRules/{forwarding_rule} " | ||
output: true | ||
- !ruby/object:Api::Type::String | ||
name: projectId | ||
description: | ||
"Required. The consumer project_id where the forwarding rule is | ||
created from. " | ||
required: true | ||
- !ruby/object:Api::Type::String | ||
name: network | ||
description: | ||
"Required. The consumer network where the IP address resides, in | ||
the form of\nprojects/{project_id}/global/networks/{network_id}. " | ||
required: true | ||
description: | ||
"Required. Immutable. User inputs and resource details of the auto-created | ||
PSC connections. " | ||
immutable: true | ||
required: true | ||
parameters: | ||
- !ruby/object:Api::Type::String | ||
name: location | ||
description: | ||
"Resource ID segment making up resource `name`. It identifies the resource | ||
within its parent collection as described in https://google.aip.dev/122. See documentation | ||
for resource type `memorystore.googleapis.com/CertificateAuthority`. " | ||
url_param_only: true | ||
required: true | ||
immutable: true | ||
- !ruby/object:Api::Type::String | ||
name: instanceId | ||
description: | ||
"Required. The ID to use for the instance, which will become the final | ||
component of\nthe instance's resource name.\n\nThis value is subject to the following | ||
restrictions:\n\n* Must be 4-63 characters in length\n* Must begin with a letter | ||
or digit\n* Must contain only lowercase letters, digits, and hyphens\n* Must not | ||
end with a hyphen\n* Must be unique within a location " | ||
url_param_only: true | ||
required: true | ||
immutable: true | ||
async: !ruby/object:Api::OpAsync | ||
operation: !ruby/object:Api::OpAsync::Operation | ||
path: name | ||
base_url: "{{op_id}}" | ||
wait_ms: 1000 | ||
timeouts: | ||
result: !ruby/object:Api::OpAsync::Result | ||
path: response | ||
resource_inside_response: true | ||
status: !ruby/object:Api::OpAsync::Status | ||
path: done | ||
complete: true | ||
allowed: | ||
- true | ||
- false | ||
error: !ruby/object:Api::OpAsync::Error | ||
path: error | ||
message: message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
!ruby/object:Api::Product | ||
versions: | ||
- !ruby/object:Api::Product::Version | ||
base_url: https://memorystore.googleapis.com/v1beta/ | ||
name: ga | ||
name: Memorystore | ||
display_name: Memorystore | ||
scopes: | ||
- https://www.googleapis.com/auth/cloud-platform |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These variables should all include a hyphen, like
my-policy
, so that our generator adds thetf-test
prefix behind the scenes, and these resources can be cleaned up if the test fails