1. Registry
  2. Packages
  3. Bytepluscc Provider
  4. API Docs
  5. iam
  6. ApiKey
Viewing docs for bytepluscc v0.0.53
published on Thursday, Sep 10, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.53
published on Thursday, Sep 10, 2026 by Byteplus

    IAM API Key。

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const example = new bytepluscc.iam.ApiKey("example", {
        userName: "user-xxxx",
        name: "ccapi-apikey-full",
        permissionsBoundary: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}",
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    example = bytepluscc.iam.ApiKey("example",
        user_name="user-xxxx",
        name="ccapi-apikey-full",
        permissions_boundary="{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}")
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.NewApiKey(ctx, "example", &iam.ApiKeyArgs{
    			UserName:            pulumi.String("user-xxxx"),
    			Name:                pulumi.String("ccapi-apikey-full"),
    			PermissionsBoundary: pulumi.String("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Bytepluscc.Iam.ApiKey("example", new()
        {
            UserName = "user-xxxx",
            Name = "ccapi-apikey-full",
            PermissionsBoundary = "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.iam.ApiKey;
    import com.byteplus.bytepluscc.iam.ApiKeyArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = new ApiKey("example", ApiKeyArgs.builder()
                .userName("user-xxxx")
                .name("ccapi-apikey-full")
                .permissionsBoundary("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}")
                .build());
    
        }
    }
    
    resources:
      example:
        type: bytepluscc:iam:ApiKey
        properties:
          userName: user-xxxx
          name: ccapi-apikey-full
          permissionsBoundary: '{"Statement":[{"Effect":"Allow","Action":["iam:*"],"Resource":["*"]}]}'
    
    pulumi {
      required_providers {
        bytepluscc = {
          source = "pulumi/bytepluscc"
        }
      }
    }
    
    resource "bytepluscc_iam_apikey" "example" {
      user_name            = "user-xxxx"
      name                 = "ccapi-apikey-full"
      permissions_boundary = "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"iam:*\"],\"Resource\":[\"*\"]}]}"
    }
    

    Create ApiKey Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiKey(name: string, args: ApiKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ApiKey(resource_name: str,
               args: ApiKeyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiKey(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               name: Optional[str] = None,
               user_name: Optional[str] = None,
               permissions_boundary: Optional[str] = None,
               status: Optional[str] = None)
    func NewApiKey(ctx *Context, name string, args ApiKeyArgs, opts ...ResourceOption) (*ApiKey, error)
    public ApiKey(string name, ApiKeyArgs args, CustomResourceOptions? opts = null)
    public ApiKey(String name, ApiKeyArgs args)
    public ApiKey(String name, ApiKeyArgs args, CustomResourceOptions options)
    
    type: bytepluscc:iam:ApiKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "bytepluscc_iam_api_key" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ApiKeyArgs
    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 ApiKeyArgs
    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 ApiKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiKeyArgs
    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 apiKeyResource = new Bytepluscc.Iam.ApiKey("apiKeyResource", new()
    {
        Name = "string",
        UserName = "string",
        PermissionsBoundary = "string",
        Status = "string",
    });
    
    example, err := iam.NewApiKey(ctx, "apiKeyResource", &iam.ApiKeyArgs{
    	Name:                pulumi.String("string"),
    	UserName:            pulumi.String("string"),
    	PermissionsBoundary: pulumi.String("string"),
    	Status:              pulumi.String("string"),
    })
    
    resource "bytepluscc_iam_api_key" "apiKeyResource" {
      lifecycle {
        create_before_destroy = true
      }
      name                 = "string"
      user_name            = "string"
      permissions_boundary = "string"
      status               = "string"
    }
    
    var apiKeyResource = new ApiKey("apiKeyResource", ApiKeyArgs.builder()
        .name("string")
        .userName("string")
        .permissionsBoundary("string")
        .status("string")
        .build());
    
    api_key_resource = bytepluscc.iam.ApiKey("apiKeyResource",
        name="string",
        user_name="string",
        permissions_boundary="string",
        status="string")
    
    const apiKeyResource = new bytepluscc.iam.ApiKey("apiKeyResource", {
        name: "string",
        userName: "string",
        permissionsBoundary: "string",
        status: "string",
    });
    
    type: bytepluscc:iam:ApiKey
    properties:
        name: string
        permissionsBoundary: string
        status: string
        userName: string
    

    ApiKey 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 ApiKey resource accepts the following input properties:

    Name string
    API Key Name
    UserName string
    Username
    PermissionsBoundary string
    Permission Boundary
    Status string
    API Key Status
    Name string
    API Key Name
    UserName string
    Username
    PermissionsBoundary string
    Permission Boundary
    Status string
    API Key Status
    name string
    API Key Name
    user_name string
    Username
    permissions_boundary string
    Permission Boundary
    status string
    API Key Status
    name String
    API Key Name
    userName String
    Username
    permissionsBoundary String
    Permission Boundary
    status String
    API Key Status
    name string
    API Key Name
    userName string
    Username
    permissionsBoundary string
    Permission Boundary
    status string
    API Key Status
    name str
    API Key Name
    user_name str
    Username
    permissions_boundary str
    Permission Boundary
    status str
    API Key Status
    name String
    API Key Name
    userName String
    Username
    permissionsBoundary String
    Permission Boundary
    status String
    API Key Status

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiKey resource produces the following output properties:

    ApiKeyId string
    API Key ID。
    CreateDate string
    Created At
    Id string
    The provider-assigned unique ID for this managed resource.
    Secret string
    API Key Secret
    UpdateDate string
    Last Updated
    ApiKeyId string
    API Key ID。
    CreateDate string
    Created At
    Id string
    The provider-assigned unique ID for this managed resource.
    Secret string
    API Key Secret
    UpdateDate string
    Last Updated
    api_key_id string
    API Key ID。
    create_date string
    Created At
    id string
    The provider-assigned unique ID for this managed resource.
    secret string
    API Key Secret
    update_date string
    Last Updated
    apiKeyId String
    API Key ID。
    createDate String
    Created At
    id String
    The provider-assigned unique ID for this managed resource.
    secret String
    API Key Secret
    updateDate String
    Last Updated
    apiKeyId string
    API Key ID。
    createDate string
    Created At
    id string
    The provider-assigned unique ID for this managed resource.
    secret string
    API Key Secret
    updateDate string
    Last Updated
    api_key_id str
    API Key ID。
    create_date str
    Created At
    id str
    The provider-assigned unique ID for this managed resource.
    secret str
    API Key Secret
    update_date str
    Last Updated
    apiKeyId String
    API Key ID。
    createDate String
    Created At
    id String
    The provider-assigned unique ID for this managed resource.
    secret String
    API Key Secret
    updateDate String
    Last Updated

    Look up Existing ApiKey Resource

    Get an existing ApiKey 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?: ApiKeyState, opts?: CustomResourceOptions): ApiKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_key_id: Optional[str] = None,
            create_date: Optional[str] = None,
            name: Optional[str] = None,
            permissions_boundary: Optional[str] = None,
            secret: Optional[str] = None,
            status: Optional[str] = None,
            update_date: Optional[str] = None,
            user_name: Optional[str] = None) -> ApiKey
    func GetApiKey(ctx *Context, name string, id IDInput, state *ApiKeyState, opts ...ResourceOption) (*ApiKey, error)
    public static ApiKey Get(string name, Input<string> id, ApiKeyState? state, CustomResourceOptions? opts = null)
    public static ApiKey get(String name, Output<String> id, ApiKeyState state, CustomResourceOptions options)
    resources:  _:    type: bytepluscc:iam:ApiKey    get:      id: ${id}
    import {
      to = bytepluscc_iam_api_key.example
      id = "${id}"
    }
    
    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.
    The following state arguments are supported:
    ApiKeyId string
    API Key ID。
    CreateDate string
    Created At
    Name string
    API Key Name
    PermissionsBoundary string
    Permission Boundary
    Secret string
    API Key Secret
    Status string
    API Key Status
    UpdateDate string
    Last Updated
    UserName string
    Username
    ApiKeyId string
    API Key ID。
    CreateDate string
    Created At
    Name string
    API Key Name
    PermissionsBoundary string
    Permission Boundary
    Secret string
    API Key Secret
    Status string
    API Key Status
    UpdateDate string
    Last Updated
    UserName string
    Username
    api_key_id string
    API Key ID。
    create_date string
    Created At
    name string
    API Key Name
    permissions_boundary string
    Permission Boundary
    secret string
    API Key Secret
    status string
    API Key Status
    update_date string
    Last Updated
    user_name string
    Username
    apiKeyId String
    API Key ID。
    createDate String
    Created At
    name String
    API Key Name
    permissionsBoundary String
    Permission Boundary
    secret String
    API Key Secret
    status String
    API Key Status
    updateDate String
    Last Updated
    userName String
    Username
    apiKeyId string
    API Key ID。
    createDate string
    Created At
    name string
    API Key Name
    permissionsBoundary string
    Permission Boundary
    secret string
    API Key Secret
    status string
    API Key Status
    updateDate string
    Last Updated
    userName string
    Username
    api_key_id str
    API Key ID。
    create_date str
    Created At
    name str
    API Key Name
    permissions_boundary str
    Permission Boundary
    secret str
    API Key Secret
    status str
    API Key Status
    update_date str
    Last Updated
    user_name str
    Username
    apiKeyId String
    API Key ID。
    createDate String
    Created At
    name String
    API Key Name
    permissionsBoundary String
    Permission Boundary
    secret String
    API Key Secret
    status String
    API Key Status
    updateDate String
    Last Updated
    userName String
    Username

    Import

    $ pulumi import bytepluscc:iam/apiKey:ApiKey example "user_name|api_key_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.53
    published on Thursday, Sep 10, 2026 by Byteplus

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial