Package com.pulumi.openstack.keymanager
Class SecretV1
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.keymanager.SecretV1
-
public class SecretV1 extends com.pulumi.resources.CustomResource## Example Usage ### Simple secret ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.keymanager.SecretV1; import com.pulumi.openstack.keymanager.SecretV1Args; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var secret1 = new SecretV1("secret1", SecretV1Args.builder() .algorithm("aes") .bitLength(256) .metadata(Map.of("key", "foo")) .mode("cbc") .payload("foobar") .payloadContentType("text/plain") .secretType("passphrase") .build()); } } ``` ### Secret with the ACL > **Note** Only read ACLs are supported ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.keymanager.SecretV1; import com.pulumi.openstack.keymanager.SecretV1Args; import com.pulumi.openstack.keymanager.inputs.SecretV1AclArgs; import com.pulumi.openstack.keymanager.inputs.SecretV1AclReadArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var secret1 = new SecretV1("secret1", SecretV1Args.builder() .payload(Files.readString(Paths.get("certificate.pem"))) .secretType("certificate") .payloadContentType("text/plain") .acl(SecretV1AclArgs.builder() .read(SecretV1AclReadArgs.builder() .projectAccess(false) .users( "userid1", "userid2") .build()) .build()) .build()); } } ``` ## Import Secrets can be imported using the secret id (the last part of the secret reference), e.g.: ```sh $ pulumi import openstack:keymanager/secretV1:SecretV1 secret_1 8a7a79c2-cf17-4e65-b2ae-ddc8bfcf6c74 ```
-
-
Constructor Summary
Constructors Constructor Description SecretV1(java.lang.String name)SecretV1(java.lang.String name, SecretV1Args args)SecretV1(java.lang.String name, SecretV1Args args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<SecretV1Acl>acl()com.pulumi.core.Output<java.lang.String>algorithm()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>allMetadata()com.pulumi.core.Output<java.lang.Integer>bitLength()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>>contentTypes()com.pulumi.core.Output<java.lang.String>createdAt()com.pulumi.core.Output<java.lang.String>creatorId()com.pulumi.core.Output<java.util.Optional<java.lang.String>>expiration()static SecretV1get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SecretV1State state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>>metadata()com.pulumi.core.Output<java.lang.String>mode()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Optional<java.lang.String>>payload()com.pulumi.core.Output<java.util.Optional<java.lang.String>>payloadContentEncoding()com.pulumi.core.Output<java.util.Optional<java.lang.String>>payloadContentType()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>secretRef()com.pulumi.core.Output<java.lang.String>secretType()com.pulumi.core.Output<java.lang.String>status()com.pulumi.core.Output<java.lang.String>updatedAt()
-
-
-
Constructor Detail
-
SecretV1
public SecretV1(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
SecretV1
public SecretV1(java.lang.String name, @Nullable SecretV1Args args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
SecretV1
public SecretV1(java.lang.String name, @Nullable SecretV1Args args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
acl
public com.pulumi.core.Output<SecretV1Acl> acl()
- Returns:
- Allows to control an access to a secret. Currently only the `read` operation is supported. If not specified, the secret is accessible project wide.
-
algorithm
public com.pulumi.core.Output<java.lang.String> algorithm()
- Returns:
- Metadata provided by a user or system for informational purposes.
-
allMetadata
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> allMetadata()
- Returns:
- The map of metadata, assigned on the secret, which has been explicitly and implicitly added.
-
bitLength
public com.pulumi.core.Output<java.lang.Integer> bitLength()
- Returns:
- Metadata provided by a user or system for informational purposes.
-
contentTypes
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.Object>> contentTypes()
- Returns:
- The map of the content types, assigned on the secret.
-
createdAt
public com.pulumi.core.Output<java.lang.String> createdAt()
- Returns:
- The date the secret ACL was created.
-
creatorId
public com.pulumi.core.Output<java.lang.String> creatorId()
- Returns:
- The creator of the secret.
-
expiration
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> expiration()
- Returns:
- The expiration time of the secret in the RFC3339 timestamp format (e.g. `2019-03-09T12:58:49Z`). If omitted, a secret will never expire. Changing this creates a new secret.
-
metadata
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>> metadata()
- Returns:
- Additional Metadata for the secret.
-
mode
public com.pulumi.core.Output<java.lang.String> mode()
- Returns:
- Metadata provided by a user or system for informational purposes.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Human-readable name for the Secret. Does not have to be unique.
-
payload
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> payload()
- Returns:
- The secret's data to be stored. **payload\_content\_type** must also be supplied if **payload** is included.
-
payloadContentEncoding
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> payloadContentEncoding()
- Returns:
- (required if **payload** is encoded) The encoding used for the payload to be able to include it in the JSON request. Must be either `base64` or `binary`.
-
payloadContentType
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> payloadContentType()
- Returns:
- (required if **payload** is included) The media type for the content of the payload. Must be one of `text/plain`, `text/plain;charset=utf-8`, `text/plain; charset=utf-8`, `application/octet-stream`, `application/pkcs8`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region in which to obtain the V1 KeyManager client. A KeyManager client is needed to create a secret. If omitted, the `region` argument of the provider is used. Changing this creates a new V1 secret.
-
secretRef
public com.pulumi.core.Output<java.lang.String> secretRef()
- Returns:
- The secret reference / where to find the secret.
-
secretType
public com.pulumi.core.Output<java.lang.String> secretType()
- Returns:
- Used to indicate the type of secret being stored. For more information see [Secret types](https://docs.openstack.org/barbican/latest/api/reference/secret_types.html).
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The status of the secret.
-
updatedAt
public com.pulumi.core.Output<java.lang.String> updatedAt()
- Returns:
- The date the secret ACL was last updated.
-
get
public static SecretV1 get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SecretV1State state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-