yandex.IamServiceAccountStaticAccessKey
Explore with Pulumi AI
Allows management of Yandex.Cloud IAM service account static access keys. Generated pair of keys is used to access Yandex Object Storage on behalf of service account.
Before using keys do not forget to assign a proper role to the service account.
Example Usage
This snippet creates a service account static access key.
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var sa_static_key = new Yandex.IamServiceAccountStaticAccessKey("sa-static-key", new Yandex.IamServiceAccountStaticAccessKeyArgs
{
Description = "static access key for object storage",
PgpKey = "keybase:keybaseusername",
ServiceAccountId = "some_sa_id",
});
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := yandex.NewIamServiceAccountStaticAccessKey(ctx, "sa-static-key", &yandex.IamServiceAccountStaticAccessKeyArgs{
Description: pulumi.String("static access key for object storage"),
PgpKey: pulumi.String("keybase:keybaseusername"),
ServiceAccountId: pulumi.String("some_sa_id"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_yandex as yandex
sa_static_key = yandex.IamServiceAccountStaticAccessKey("sa-static-key",
description="static access key for object storage",
pgp_key="keybase:keybaseusername",
service_account_id="some_sa_id")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const sa_static_key = new yandex.IamServiceAccountStaticAccessKey("sa-static-key", {
description: "static access key for object storage",
pgpKey: "keybase:keybaseusername",
serviceAccountId: "some_sa_id",
});
Coming soon!
Create IamServiceAccountStaticAccessKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamServiceAccountStaticAccessKey(name: string, args: IamServiceAccountStaticAccessKeyArgs, opts?: CustomResourceOptions);
@overload
def IamServiceAccountStaticAccessKey(resource_name: str,
args: IamServiceAccountStaticAccessKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamServiceAccountStaticAccessKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_account_id: Optional[str] = None,
description: Optional[str] = None,
pgp_key: Optional[str] = None)
func NewIamServiceAccountStaticAccessKey(ctx *Context, name string, args IamServiceAccountStaticAccessKeyArgs, opts ...ResourceOption) (*IamServiceAccountStaticAccessKey, error)
public IamServiceAccountStaticAccessKey(string name, IamServiceAccountStaticAccessKeyArgs args, CustomResourceOptions? opts = null)
public IamServiceAccountStaticAccessKey(String name, IamServiceAccountStaticAccessKeyArgs args)
public IamServiceAccountStaticAccessKey(String name, IamServiceAccountStaticAccessKeyArgs args, CustomResourceOptions options)
type: yandex:IamServiceAccountStaticAccessKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IamServiceAccountStaticAccessKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IamServiceAccountStaticAccessKeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IamServiceAccountStaticAccessKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamServiceAccountStaticAccessKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamServiceAccountStaticAccessKeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var iamServiceAccountStaticAccessKeyResource = new Yandex.IamServiceAccountStaticAccessKey("iamServiceAccountStaticAccessKeyResource", new()
{
ServiceAccountId = "string",
Description = "string",
PgpKey = "string",
});
example, err := yandex.NewIamServiceAccountStaticAccessKey(ctx, "iamServiceAccountStaticAccessKeyResource", &yandex.IamServiceAccountStaticAccessKeyArgs{
ServiceAccountId: pulumi.String("string"),
Description: pulumi.String("string"),
PgpKey: pulumi.String("string"),
})
var iamServiceAccountStaticAccessKeyResource = new IamServiceAccountStaticAccessKey("iamServiceAccountStaticAccessKeyResource", IamServiceAccountStaticAccessKeyArgs.builder()
.serviceAccountId("string")
.description("string")
.pgpKey("string")
.build());
iam_service_account_static_access_key_resource = yandex.IamServiceAccountStaticAccessKey("iamServiceAccountStaticAccessKeyResource",
service_account_id="string",
description="string",
pgp_key="string")
const iamServiceAccountStaticAccessKeyResource = new yandex.IamServiceAccountStaticAccessKey("iamServiceAccountStaticAccessKeyResource", {
serviceAccountId: "string",
description: "string",
pgpKey: "string",
});
type: yandex:IamServiceAccountStaticAccessKey
properties:
description: string
pgpKey: string
serviceAccountId: string
IamServiceAccountStaticAccessKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IamServiceAccountStaticAccessKey resource accepts the following input properties:
- Service
Account stringId - ID of the service account which is used to get a static key.
- Description string
- The description of the service account static key.
- Pgp
Key string - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
.
- Service
Account stringId - ID of the service account which is used to get a static key.
- Description string
- The description of the service account static key.
- Pgp
Key string - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
.
- service
Account StringId - ID of the service account which is used to get a static key.
- description String
- The description of the service account static key.
- pgp
Key String - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
.
- service
Account stringId - ID of the service account which is used to get a static key.
- description string
- The description of the service account static key.
- pgp
Key string - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
.
- service_
account_ strid - ID of the service account which is used to get a static key.
- description str
- The description of the service account static key.
- pgp_
key str - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
.
- service
Account StringId - ID of the service account which is used to get a static key.
- description String
- The description of the service account static key.
- pgp
Key String - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamServiceAccountStaticAccessKey resource produces the following output properties:
- Access
Key string - ID of the static access key.
- Created
At string - Creation timestamp of the static access key.
- Encrypted
Secret stringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - Id string
- The provider-assigned unique ID for this managed resource.
- Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - Secret
Key string - Private part of generated static access key. This is only populated when no
pgp_key
is provided.
- Access
Key string - ID of the static access key.
- Created
At string - Creation timestamp of the static access key.
- Encrypted
Secret stringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - Id string
- The provider-assigned unique ID for this managed resource.
- Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - Secret
Key string - Private part of generated static access key. This is only populated when no
pgp_key
is provided.
- access
Key String - ID of the static access key.
- created
At String - Creation timestamp of the static access key.
- encrypted
Secret StringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - id String
- The provider-assigned unique ID for this managed resource.
- key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - secret
Key String - Private part of generated static access key. This is only populated when no
pgp_key
is provided.
- access
Key string - ID of the static access key.
- created
At string - Creation timestamp of the static access key.
- encrypted
Secret stringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - id string
- The provider-assigned unique ID for this managed resource.
- key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - secret
Key string - Private part of generated static access key. This is only populated when no
pgp_key
is provided.
- access_
key str - ID of the static access key.
- created_
at str - Creation timestamp of the static access key.
- encrypted_
secret_ strkey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - id str
- The provider-assigned unique ID for this managed resource.
- key_
fingerprint str - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - secret_
key str - Private part of generated static access key. This is only populated when no
pgp_key
is provided.
- access
Key String - ID of the static access key.
- created
At String - Creation timestamp of the static access key.
- encrypted
Secret StringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - id String
- The provider-assigned unique ID for this managed resource.
- key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - secret
Key String - Private part of generated static access key. This is only populated when no
pgp_key
is provided.
Look up Existing IamServiceAccountStaticAccessKey Resource
Get an existing IamServiceAccountStaticAccessKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IamServiceAccountStaticAccessKeyState, opts?: CustomResourceOptions): IamServiceAccountStaticAccessKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_key: Optional[str] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
encrypted_secret_key: Optional[str] = None,
key_fingerprint: Optional[str] = None,
pgp_key: Optional[str] = None,
secret_key: Optional[str] = None,
service_account_id: Optional[str] = None) -> IamServiceAccountStaticAccessKey
func GetIamServiceAccountStaticAccessKey(ctx *Context, name string, id IDInput, state *IamServiceAccountStaticAccessKeyState, opts ...ResourceOption) (*IamServiceAccountStaticAccessKey, error)
public static IamServiceAccountStaticAccessKey Get(string name, Input<string> id, IamServiceAccountStaticAccessKeyState? state, CustomResourceOptions? opts = null)
public static IamServiceAccountStaticAccessKey get(String name, Output<String> id, IamServiceAccountStaticAccessKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Key string - ID of the static access key.
- Created
At string - Creation timestamp of the static access key.
- Description string
- The description of the service account static key.
- Encrypted
Secret stringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - Pgp
Key string - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
. - Secret
Key string - Private part of generated static access key. This is only populated when no
pgp_key
is provided. - Service
Account stringId - ID of the service account which is used to get a static key.
- Access
Key string - ID of the static access key.
- Created
At string - Creation timestamp of the static access key.
- Description string
- The description of the service account static key.
- Encrypted
Secret stringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - Key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - Pgp
Key string - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
. - Secret
Key string - Private part of generated static access key. This is only populated when no
pgp_key
is provided. - Service
Account stringId - ID of the service account which is used to get a static key.
- access
Key String - ID of the static access key.
- created
At String - Creation timestamp of the static access key.
- description String
- The description of the service account static key.
- encrypted
Secret StringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - pgp
Key String - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
. - secret
Key String - Private part of generated static access key. This is only populated when no
pgp_key
is provided. - service
Account StringId - ID of the service account which is used to get a static key.
- access
Key string - ID of the static access key.
- created
At string - Creation timestamp of the static access key.
- description string
- The description of the service account static key.
- encrypted
Secret stringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - key
Fingerprint string - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - pgp
Key string - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
. - secret
Key string - Private part of generated static access key. This is only populated when no
pgp_key
is provided. - service
Account stringId - ID of the service account which is used to get a static key.
- access_
key str - ID of the static access key.
- created_
at str - Creation timestamp of the static access key.
- description str
- The description of the service account static key.
- encrypted_
secret_ strkey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - key_
fingerprint str - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - pgp_
key str - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
. - secret_
key str - Private part of generated static access key. This is only populated when no
pgp_key
is provided. - service_
account_ strid - ID of the service account which is used to get a static key.
- access
Key String - ID of the static access key.
- created
At String - Creation timestamp of the static access key.
- description String
- The description of the service account static key.
- encrypted
Secret StringKey - The encrypted secret, base64 encoded. This is only populated when
pgp_key
is supplied. - key
Fingerprint String - The fingerprint of the PGP key used to encrypt the secret key. This is only populated when
pgp_key
is supplied. - pgp
Key String - An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form
keybase:keybaseusername
. - secret
Key String - Private part of generated static access key. This is only populated when no
pgp_key
is provided. - service
Account StringId - ID of the service account which is used to get a static key.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.