- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- ValidationResult
- ValidationResult.ValidatorType
- Examples
- Try it!
memberships.validateCreate is a preflight check for memberships.create. It checks the following: 1. Caller has the required gkehub.memberships.create
permission. 2. The membershipId is still available.
HTTP request
POST https://gkehub.googleapis.com/v1alpha/{parent=projects/*/locations/*}/memberships:validateCreate
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Required. The parent (project and location) where the Memberships will be created. Specified in the format Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"membershipId": string,
"membership": {
object ( |
Fields | |
---|---|
membership |
Required. Client chosen membership id. |
membership |
Required. Membership resource to be created. |
Response body
Response message for the GkeHub.ValidateCreateMembership
method.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"validationResults": [
{
object ( |
Fields | |
---|---|
validation |
Wraps all the validator results. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
ValidationResult
ValidationResults are results set by each validator running during memberships.validateCreate.
JSON representation |
---|
{
"validator": enum ( |
Fields | |
---|---|
validator |
Validator type to validate membership with. |
success |
Whether the validation is passed or not. |
result |
Additional information for the validation. |
ValidationResult.ValidatorType
Specifies different types of validation.
Enums | |
---|---|
VALIDATOR_TYPE_UNSPECIFIED |
UNSPECIFIED validator. |
MEMBERSHIP_ID |
MEMBERSHIP_ID validator validates that the membershipId is still available. |
CROSS_PROJECT_PERMISSION |
CROSS_PROJECT_PERMISSION validator validates that the cross-project role binding for the service agent is in place. |