@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location. * * <p>Sample code: * * <pre><code> * try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * String keyRingId = ""; * KeyRing keyRing = KeyRing.newBuilder().build(); * KeyRing response = keyManagementServiceClient.createKeyRing(parent.toString(), keyRingId, keyRing); * } * </code></pre> * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = CreateKeyRingRequest.newBuilder() .setParent(parent) .setKeyRingId(keyRingId) .setKeyRing(keyRing) .build(); return createKeyRing(request); }
/** * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location. * * <p>Sample code: * * <pre><code> * try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * String keyRingId = ""; * KeyRing keyRing = KeyRing.newBuilder().build(); * KeyRing response = keyManagementServiceClient.createKeyRing(parent, keyRingId, keyRing); * } * </code></pre> * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = CreateKeyRingRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setKeyRingId(keyRingId) .setKeyRing(keyRing) .build(); return createKeyRing(request); }
CreateKeyRingRequest.newBuilder() .setParent(keyRingParent) .setKeyRingId(keyRingName)
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
/** * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location. * * <p>Sample code: * * <pre><code> * try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * String keyRingId = ""; * KeyRing keyRing = KeyRing.newBuilder().build(); * KeyRing response = keyManagementServiceClient.createKeyRing(parent.toString(), keyRingId, keyRing); * } * </code></pre> * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(String parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = CreateKeyRingRequest.newBuilder() .setParent(parent) .setKeyRingId(keyRingId) .setKeyRing(keyRing) .build(); return createKeyRing(request); }
/** * Create a new [KeyRing][google.cloud.kms.v1.KeyRing] in a given Project and Location. * * <p>Sample code: * * <pre><code> * try (KeyManagementServiceClient keyManagementServiceClient = KeyManagementServiceClient.create()) { * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); * String keyRingId = ""; * KeyRing keyRing = KeyRing.newBuilder().build(); * KeyRing response = keyManagementServiceClient.createKeyRing(parent, keyRingId, keyRing); * } * </code></pre> * * @param parent Required. The resource name of the location associated with the * [KeyRings][google.cloud.kms.v1.KeyRing], in the format `projects/*/locations/*`. * @param keyRingId Required. It must be unique within a location and match the regular expression * `[a-zA-Z0-9_-]{1,63}` * @param keyRing A [KeyRing][google.cloud.kms.v1.KeyRing] with initial field values. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final KeyRing createKeyRing(LocationName parent, String keyRingId, KeyRing keyRing) { CreateKeyRingRequest request = CreateKeyRingRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setKeyRingId(keyRingId) .setKeyRing(keyRing) .build(); return createKeyRing(request); }