ibm.ResourceKey
Explore with Pulumi AI
Create, update, or delete service credentials for an IAM-enabled service. By default, the ibm.ResourceKey
resource creates service credentials that use the public service endpoint of a service. To create service credentials that use the private service endpoint instead, you must explicitly define that by using the parameter
argument parameter. Note that your service might not support private service endpoints yet. For more information, about resource key, see adding and viewing credentials.
Example Usage
The following example enables to create credentials for a resource without a service ID.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetResourceInstanceArgs;
import com.pulumi.ibm.ResourceKey;
import com.pulumi.ibm.ResourceKeyArgs;
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) {
final var resourceInstance = IbmFunctions.getResourceInstance(GetResourceInstanceArgs.builder()
.name("myobjectsotrage")
.build());
var resourceKey = new ResourceKey("resourceKey", ResourceKeyArgs.builder()
.role("Viewer")
.resourceInstanceId(resourceInstance.applyValue(getResourceInstanceResult -> getResourceInstanceResult.id()))
.timeouts(ResourceKeyTimeoutsArgs.builder()
.create("15m")
.delete("15m")
.build())
.build());
}
}
resources:
resourceKey:
type: ibm:ResourceKey
properties:
role: Viewer
resourceInstanceId: ${resourceInstance.id}
# User can increase timeouts
timeouts:
- create: 15m
delete: 15m
variables:
resourceInstance:
fn::invoke:
function: ibm:getResourceInstance
arguments:
name: myobjectsotrage
Note The current ibm.ResourceKey
resource doesn’t have support for service_id argument but the service_id can be passed as one of the parameter.
Example to create by using serviceID
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetResourceInstanceArgs;
import com.pulumi.ibm.IamServiceId;
import com.pulumi.ibm.IamServiceIdArgs;
import com.pulumi.ibm.ResourceKey;
import com.pulumi.ibm.ResourceKeyArgs;
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) {
final var resourceInstance = IbmFunctions.getResourceInstance(GetResourceInstanceArgs.builder()
.name("myobjectsotrage")
.build());
var serviceID = new IamServiceId("serviceID", IamServiceIdArgs.builder()
.description("New ServiceID")
.build());
var resourceKey = new ResourceKey("resourceKey", ResourceKeyArgs.builder()
.role("Viewer")
.resourceInstanceId(resourceInstance.applyValue(getResourceInstanceResult -> getResourceInstanceResult.id()))
.parameters(Map.of("serviceid_crn", serviceID.crn()))
.timeouts(ResourceKeyTimeoutsArgs.builder()
.create("15m")
.delete("15m")
.build())
.build());
}
}
resources:
serviceID:
type: ibm:IamServiceId
properties:
description: New ServiceID
resourceKey:
type: ibm:ResourceKey
properties:
role: Viewer
resourceInstanceId: ${resourceInstance.id}
parameters:
serviceid_crn: ${serviceID.crn}
# User can increase timeouts
timeouts:
- create: 15m
delete: 15m
variables:
resourceInstance:
fn::invoke:
function: ibm:getResourceInstance
arguments:
name: myobjectsotrage
Example to create by using HMAC
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetResourceGroupArgs;
import com.pulumi.ibm.ResourceInstance;
import com.pulumi.ibm.ResourceInstanceArgs;
import com.pulumi.ibm.ResourceKey;
import com.pulumi.ibm.ResourceKeyArgs;
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) {
final var group = IbmFunctions.getResourceGroup(GetResourceGroupArgs.builder()
.name("Default")
.build());
var resourceInstance = new ResourceInstance("resourceInstance", ResourceInstanceArgs.builder()
.service("cloud-object-storage")
.plan("lite")
.location("global")
.resourceGroupId(group.applyValue(getResourceGroupResult -> getResourceGroupResult.id()))
.tags(
"tag1",
"tag2")
.timeouts(ResourceInstanceTimeoutsArgs.builder()
.create("15m")
.update("15m")
.delete("15m")
.build())
.build());
var resourceKey = new ResourceKey("resourceKey", ResourceKeyArgs.builder()
.resourceInstanceId(resourceInstance.resourceInstanceId())
.parameters(Map.of("HMAC", true))
.role("Manager")
.build());
}
}
resources:
resourceInstance:
type: ibm:ResourceInstance
properties:
service: cloud-object-storage
plan: lite
location: global
resourceGroupId: ${group.id}
tags:
- tag1
- tag2
# User can increase timeouts
timeouts:
- create: 15m
update: 15m
delete: 15m
resourceKey:
type: ibm:ResourceKey
properties:
resourceInstanceId: ${resourceInstance.resourceInstanceId}
parameters:
HMAC: true
role: Manager
variables:
group:
fn::invoke:
function: ibm:getResourceGroup
arguments:
name: Default
Example to access resource credentials using credentials attribute:
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const key = new ibm.ResourceKey("key", {
resourceInstanceId: ibm_resource_instance.resource_instance.id,
role: "Manager",
});
export const accessKeyId = key.credentials["cos_hmac_keys.access_key_id"];
export const secretAccessKey = key.credentials["cos_hmac_keys.secret_access_key"];
import pulumi
import pulumi_ibm as ibm
key = ibm.ResourceKey("key",
resource_instance_id=ibm_resource_instance["resource_instance"]["id"],
role="Manager")
pulumi.export("accessKeyId", key.credentials["cos_hmac_keys.access_key_id"])
pulumi.export("secretAccessKey", key.credentials["cos_hmac_keys.secret_access_key"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
key, err := ibm.NewResourceKey(ctx, "key", &ibm.ResourceKeyArgs{
ResourceInstanceId: pulumi.Any(ibm_resource_instance.Resource_instance.Id),
Role: pulumi.String("Manager"),
})
if err != nil {
return err
}
ctx.Export("accessKeyId", key.Credentials.ApplyT(func(credentials map[string]string) (string, error) {
return credentials.Cos_hmac_keys.access_key_id, nil
}).(pulumi.StringOutput))
ctx.Export("secretAccessKey", key.Credentials.ApplyT(func(credentials map[string]string) (string, error) {
return credentials.Cos_hmac_keys.secret_access_key, nil
}).(pulumi.StringOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var key = new Ibm.ResourceKey("key", new()
{
ResourceInstanceId = ibm_resource_instance.Resource_instance.Id,
Role = "Manager",
});
return new Dictionary<string, object?>
{
["accessKeyId"] = key.Credentials.Apply(credentials => credentials.Cos_hmac_keys_access_key_id),
["secretAccessKey"] = key.Credentials.Apply(credentials => credentials.Cos_hmac_keys_secret_access_key),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.ResourceKey;
import com.pulumi.ibm.ResourceKeyArgs;
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 key = new ResourceKey("key", ResourceKeyArgs.builder()
.resourceInstanceId(ibm_resource_instance.resource_instance().id())
.role("Manager")
.build());
ctx.export("accessKeyId", key.credentials().applyValue(credentials -> credentials.cos_hmac_keys.access_key_id()));
ctx.export("secretAccessKey", key.credentials().applyValue(credentials -> credentials.cos_hmac_keys.secret_access_key()));
}
}
resources:
key:
type: ibm:ResourceKey
properties:
resourceInstanceId: ${ibm_resource_instance.resource_instance.id}
role: Manager
outputs:
accessKeyId: ${key.credentials"cos_hmac_keys.access_key_id"[%!s(MISSING)]}
secretAccessKey: ${key.credentials"cos_hmac_keys.secret_access_key"[%!s(MISSING)]}
Create ResourceKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ResourceKey(name: string, args?: ResourceKeyArgs, opts?: CustomResourceOptions);
@overload
def ResourceKey(resource_name: str,
args: Optional[ResourceKeyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ResourceKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
parameters: Optional[Mapping[str, str]] = None,
resource_alias_id: Optional[str] = None,
resource_instance_id: Optional[str] = None,
resource_key_id: Optional[str] = None,
role: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[ResourceKeyTimeoutsArgs] = None)
func NewResourceKey(ctx *Context, name string, args *ResourceKeyArgs, opts ...ResourceOption) (*ResourceKey, error)
public ResourceKey(string name, ResourceKeyArgs? args = null, CustomResourceOptions? opts = null)
public ResourceKey(String name, ResourceKeyArgs args)
public ResourceKey(String name, ResourceKeyArgs args, CustomResourceOptions options)
type: ibm:ResourceKey
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 ResourceKeyArgs
- 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 ResourceKeyArgs
- 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 ResourceKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceKeyArgs
- 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 resourceKeyResource = new Ibm.ResourceKey("resourceKeyResource", new()
{
Name = "string",
Parameters =
{
{ "string", "string" },
},
ResourceInstanceId = "string",
ResourceKeyId = "string",
Role = "string",
Tags = new[]
{
"string",
},
Timeouts = new Ibm.Inputs.ResourceKeyTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := ibm.NewResourceKey(ctx, "resourceKeyResource", &ibm.ResourceKeyArgs{
Name: pulumi.String("string"),
Parameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
ResourceInstanceId: pulumi.String("string"),
ResourceKeyId: pulumi.String("string"),
Role: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &ibm.ResourceKeyTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var resourceKeyResource = new ResourceKey("resourceKeyResource", ResourceKeyArgs.builder()
.name("string")
.parameters(Map.of("string", "string"))
.resourceInstanceId("string")
.resourceKeyId("string")
.role("string")
.tags("string")
.timeouts(ResourceKeyTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
resource_key_resource = ibm.ResourceKey("resourceKeyResource",
name="string",
parameters={
"string": "string",
},
resource_instance_id="string",
resource_key_id="string",
role="string",
tags=["string"],
timeouts={
"create": "string",
"delete": "string",
})
const resourceKeyResource = new ibm.ResourceKey("resourceKeyResource", {
name: "string",
parameters: {
string: "string",
},
resourceInstanceId: "string",
resourceKeyId: "string",
role: "string",
tags: ["string"],
timeouts: {
create: "string",
"delete": "string",
},
});
type: ibm:ResourceKey
properties:
name: string
parameters:
string: string
resourceInstanceId: string
resourceKeyId: string
role: string
tags:
- string
timeouts:
create: string
delete: string
ResourceKey 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 ResourceKey resource accepts the following input properties:
- Name string
- A descriptive name used to identify a resource key.
- Parameters Dictionary<string, string>
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - Resource
Alias stringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - Resource
Instance stringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - Resource
Key stringId - (String) The unique identifier of the new resource key.
- Role string
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - List<string>
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- Timeouts
Resource
Key Timeouts
- Name string
- A descriptive name used to identify a resource key.
- Parameters map[string]string
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - Resource
Alias stringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - Resource
Instance stringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - Resource
Key stringId - (String) The unique identifier of the new resource key.
- Role string
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - []string
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- Timeouts
Resource
Key Timeouts Args
- name String
- A descriptive name used to identify a resource key.
- parameters Map<String,String>
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource
Alias StringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource
Instance StringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource
Key StringId - (String) The unique identifier of the new resource key.
- role String
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - List<String>
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts
Resource
Key Timeouts
- name string
- A descriptive name used to identify a resource key.
- parameters {[key: string]: string}
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource
Alias stringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource
Instance stringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource
Key stringId - (String) The unique identifier of the new resource key.
- role string
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - string[]
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts
Resource
Key Timeouts
- name str
- A descriptive name used to identify a resource key.
- parameters Mapping[str, str]
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource_
alias_ strid - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource_
instance_ strid - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource_
key_ strid - (String) The unique identifier of the new resource key.
- role str
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - Sequence[str]
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts
Resource
Key Timeouts Args
- name String
- A descriptive name used to identify a resource key.
- parameters Map<String>
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource
Alias StringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource
Instance StringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource
Key StringId - (String) The unique identifier of the new resource key.
- role String
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - List<String>
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourceKey resource produces the following output properties:
- Account
Id string - (String) An alpha-numeric value identifying the account ID.
- Created
At string - (Timestamp) The date when the key was created.
- Created
By string - (String) The subject who created the key.
- Credentials Dictionary<string, string>
- (Map) The credentials associated with the key.
- Credentials
Json string - (String) The credentials associated with the key in json format.
- Crn string
- (String) The full Cloud Resource Name (CRN) associated with the key.
- Deleted
At string - (Timestamp) The date when the key was deleted.
- Deleted
By string - (String) The subject who deleted the key.
- Guid string
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- Iam
Compatible bool - (String) Specifies whether the key’s credentials support IAM.
- Id string
- The provider-assigned unique ID for this managed resource.
- Onetime
Credentials bool - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- Resource
Group stringId - (String) The short ID of the resource group.
- Resource
Instance stringUrl - (String) The relative path to the resource.
- Source
Crn string - (String) The CRN of resource instance or alias associated to the key.
- State string
- (String) The state of the key.
- Status string
- (String) The status of the resource key.
- Updated
At string - (Timestamp) The date when the key was last updated.
- Updated
By string - (String) The subject who updated the key.
- Url string
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- Account
Id string - (String) An alpha-numeric value identifying the account ID.
- Created
At string - (Timestamp) The date when the key was created.
- Created
By string - (String) The subject who created the key.
- Credentials map[string]string
- (Map) The credentials associated with the key.
- Credentials
Json string - (String) The credentials associated with the key in json format.
- Crn string
- (String) The full Cloud Resource Name (CRN) associated with the key.
- Deleted
At string - (Timestamp) The date when the key was deleted.
- Deleted
By string - (String) The subject who deleted the key.
- Guid string
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- Iam
Compatible bool - (String) Specifies whether the key’s credentials support IAM.
- Id string
- The provider-assigned unique ID for this managed resource.
- Onetime
Credentials bool - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- Resource
Group stringId - (String) The short ID of the resource group.
- Resource
Instance stringUrl - (String) The relative path to the resource.
- Source
Crn string - (String) The CRN of resource instance or alias associated to the key.
- State string
- (String) The state of the key.
- Status string
- (String) The status of the resource key.
- Updated
At string - (Timestamp) The date when the key was last updated.
- Updated
By string - (String) The subject who updated the key.
- Url string
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account
Id String - (String) An alpha-numeric value identifying the account ID.
- created
At String - (Timestamp) The date when the key was created.
- created
By String - (String) The subject who created the key.
- credentials Map<String,String>
- (Map) The credentials associated with the key.
- credentials
Json String - (String) The credentials associated with the key in json format.
- crn String
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted
At String - (Timestamp) The date when the key was deleted.
- deleted
By String - (String) The subject who deleted the key.
- guid String
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam
Compatible Boolean - (String) Specifies whether the key’s credentials support IAM.
- id String
- The provider-assigned unique ID for this managed resource.
- onetime
Credentials Boolean - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- resource
Group StringId - (String) The short ID of the resource group.
- resource
Instance StringUrl - (String) The relative path to the resource.
- source
Crn String - (String) The CRN of resource instance or alias associated to the key.
- state String
- (String) The state of the key.
- status String
- (String) The status of the resource key.
- updated
At String - (Timestamp) The date when the key was last updated.
- updated
By String - (String) The subject who updated the key.
- url String
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account
Id string - (String) An alpha-numeric value identifying the account ID.
- created
At string - (Timestamp) The date when the key was created.
- created
By string - (String) The subject who created the key.
- credentials {[key: string]: string}
- (Map) The credentials associated with the key.
- credentials
Json string - (String) The credentials associated with the key in json format.
- crn string
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted
At string - (Timestamp) The date when the key was deleted.
- deleted
By string - (String) The subject who deleted the key.
- guid string
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam
Compatible boolean - (String) Specifies whether the key’s credentials support IAM.
- id string
- The provider-assigned unique ID for this managed resource.
- onetime
Credentials boolean - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- resource
Group stringId - (String) The short ID of the resource group.
- resource
Instance stringUrl - (String) The relative path to the resource.
- source
Crn string - (String) The CRN of resource instance or alias associated to the key.
- state string
- (String) The state of the key.
- status string
- (String) The status of the resource key.
- updated
At string - (Timestamp) The date when the key was last updated.
- updated
By string - (String) The subject who updated the key.
- url string
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account_
id str - (String) An alpha-numeric value identifying the account ID.
- created_
at str - (Timestamp) The date when the key was created.
- created_
by str - (String) The subject who created the key.
- credentials Mapping[str, str]
- (Map) The credentials associated with the key.
- credentials_
json str - (String) The credentials associated with the key in json format.
- crn str
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted_
at str - (Timestamp) The date when the key was deleted.
- deleted_
by str - (String) The subject who deleted the key.
- guid str
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam_
compatible bool - (String) Specifies whether the key’s credentials support IAM.
- id str
- The provider-assigned unique ID for this managed resource.
- onetime_
credentials bool - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- resource_
group_ strid - (String) The short ID of the resource group.
- resource_
instance_ strurl - (String) The relative path to the resource.
- source_
crn str - (String) The CRN of resource instance or alias associated to the key.
- state str
- (String) The state of the key.
- status str
- (String) The status of the resource key.
- updated_
at str - (Timestamp) The date when the key was last updated.
- updated_
by str - (String) The subject who updated the key.
- url str
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account
Id String - (String) An alpha-numeric value identifying the account ID.
- created
At String - (Timestamp) The date when the key was created.
- created
By String - (String) The subject who created the key.
- credentials Map<String>
- (Map) The credentials associated with the key.
- credentials
Json String - (String) The credentials associated with the key in json format.
- crn String
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted
At String - (Timestamp) The date when the key was deleted.
- deleted
By String - (String) The subject who deleted the key.
- guid String
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam
Compatible Boolean - (String) Specifies whether the key’s credentials support IAM.
- id String
- The provider-assigned unique ID for this managed resource.
- onetime
Credentials Boolean - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- resource
Group StringId - (String) The short ID of the resource group.
- resource
Instance StringUrl - (String) The relative path to the resource.
- source
Crn String - (String) The CRN of resource instance or alias associated to the key.
- state String
- (String) The state of the key.
- status String
- (String) The status of the resource key.
- updated
At String - (Timestamp) The date when the key was last updated.
- updated
By String - (String) The subject who updated the key.
- url String
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
Look up Existing ResourceKey Resource
Get an existing ResourceKey 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?: ResourceKeyState, opts?: CustomResourceOptions): ResourceKey
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
credentials: Optional[Mapping[str, str]] = None,
credentials_json: Optional[str] = None,
crn: Optional[str] = None,
deleted_at: Optional[str] = None,
deleted_by: Optional[str] = None,
guid: Optional[str] = None,
iam_compatible: Optional[bool] = None,
name: Optional[str] = None,
onetime_credentials: Optional[bool] = None,
parameters: Optional[Mapping[str, str]] = None,
resource_alias_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
resource_instance_id: Optional[str] = None,
resource_instance_url: Optional[str] = None,
resource_key_id: Optional[str] = None,
role: Optional[str] = None,
source_crn: Optional[str] = None,
state: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
timeouts: Optional[ResourceKeyTimeoutsArgs] = None,
updated_at: Optional[str] = None,
updated_by: Optional[str] = None,
url: Optional[str] = None) -> ResourceKey
func GetResourceKey(ctx *Context, name string, id IDInput, state *ResourceKeyState, opts ...ResourceOption) (*ResourceKey, error)
public static ResourceKey Get(string name, Input<string> id, ResourceKeyState? state, CustomResourceOptions? opts = null)
public static ResourceKey get(String name, Output<String> id, ResourceKeyState state, CustomResourceOptions options)
resources: _: type: ibm:ResourceKey get: 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.
- Account
Id string - (String) An alpha-numeric value identifying the account ID.
- Created
At string - (Timestamp) The date when the key was created.
- Created
By string - (String) The subject who created the key.
- Credentials Dictionary<string, string>
- (Map) The credentials associated with the key.
- Credentials
Json string - (String) The credentials associated with the key in json format.
- Crn string
- (String) The full Cloud Resource Name (CRN) associated with the key.
- Deleted
At string - (Timestamp) The date when the key was deleted.
- Deleted
By string - (String) The subject who deleted the key.
- Guid string
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- Iam
Compatible bool - (String) Specifies whether the key’s credentials support IAM.
- Name string
- A descriptive name used to identify a resource key.
- Onetime
Credentials bool - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- Parameters Dictionary<string, string>
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - Resource
Alias stringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - Resource
Group stringId - (String) The short ID of the resource group.
- Resource
Instance stringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - Resource
Instance stringUrl - (String) The relative path to the resource.
- Resource
Key stringId - (String) The unique identifier of the new resource key.
- Role string
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - Source
Crn string - (String) The CRN of resource instance or alias associated to the key.
- State string
- (String) The state of the key.
- Status string
- (String) The status of the resource key.
- List<string>
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- Timeouts
Resource
Key Timeouts - Updated
At string - (Timestamp) The date when the key was last updated.
- Updated
By string - (String) The subject who updated the key.
- Url string
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- Account
Id string - (String) An alpha-numeric value identifying the account ID.
- Created
At string - (Timestamp) The date when the key was created.
- Created
By string - (String) The subject who created the key.
- Credentials map[string]string
- (Map) The credentials associated with the key.
- Credentials
Json string - (String) The credentials associated with the key in json format.
- Crn string
- (String) The full Cloud Resource Name (CRN) associated with the key.
- Deleted
At string - (Timestamp) The date when the key was deleted.
- Deleted
By string - (String) The subject who deleted the key.
- Guid string
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- Iam
Compatible bool - (String) Specifies whether the key’s credentials support IAM.
- Name string
- A descriptive name used to identify a resource key.
- Onetime
Credentials bool - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- Parameters map[string]string
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - Resource
Alias stringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - Resource
Group stringId - (String) The short ID of the resource group.
- Resource
Instance stringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - Resource
Instance stringUrl - (String) The relative path to the resource.
- Resource
Key stringId - (String) The unique identifier of the new resource key.
- Role string
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - Source
Crn string - (String) The CRN of resource instance or alias associated to the key.
- State string
- (String) The state of the key.
- Status string
- (String) The status of the resource key.
- []string
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- Timeouts
Resource
Key Timeouts Args - Updated
At string - (Timestamp) The date when the key was last updated.
- Updated
By string - (String) The subject who updated the key.
- Url string
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account
Id String - (String) An alpha-numeric value identifying the account ID.
- created
At String - (Timestamp) The date when the key was created.
- created
By String - (String) The subject who created the key.
- credentials Map<String,String>
- (Map) The credentials associated with the key.
- credentials
Json String - (String) The credentials associated with the key in json format.
- crn String
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted
At String - (Timestamp) The date when the key was deleted.
- deleted
By String - (String) The subject who deleted the key.
- guid String
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam
Compatible Boolean - (String) Specifies whether the key’s credentials support IAM.
- name String
- A descriptive name used to identify a resource key.
- onetime
Credentials Boolean - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- parameters Map<String,String>
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource
Alias StringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource
Group StringId - (String) The short ID of the resource group.
- resource
Instance StringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource
Instance StringUrl - (String) The relative path to the resource.
- resource
Key StringId - (String) The unique identifier of the new resource key.
- role String
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - source
Crn String - (String) The CRN of resource instance or alias associated to the key.
- state String
- (String) The state of the key.
- status String
- (String) The status of the resource key.
- List<String>
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts
Resource
Key Timeouts - updated
At String - (Timestamp) The date when the key was last updated.
- updated
By String - (String) The subject who updated the key.
- url String
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account
Id string - (String) An alpha-numeric value identifying the account ID.
- created
At string - (Timestamp) The date when the key was created.
- created
By string - (String) The subject who created the key.
- credentials {[key: string]: string}
- (Map) The credentials associated with the key.
- credentials
Json string - (String) The credentials associated with the key in json format.
- crn string
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted
At string - (Timestamp) The date when the key was deleted.
- deleted
By string - (String) The subject who deleted the key.
- guid string
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam
Compatible boolean - (String) Specifies whether the key’s credentials support IAM.
- name string
- A descriptive name used to identify a resource key.
- onetime
Credentials boolean - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- parameters {[key: string]: string}
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource
Alias stringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource
Group stringId - (String) The short ID of the resource group.
- resource
Instance stringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource
Instance stringUrl - (String) The relative path to the resource.
- resource
Key stringId - (String) The unique identifier of the new resource key.
- role string
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - source
Crn string - (String) The CRN of resource instance or alias associated to the key.
- state string
- (String) The state of the key.
- status string
- (String) The status of the resource key.
- string[]
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts
Resource
Key Timeouts - updated
At string - (Timestamp) The date when the key was last updated.
- updated
By string - (String) The subject who updated the key.
- url string
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account_
id str - (String) An alpha-numeric value identifying the account ID.
- created_
at str - (Timestamp) The date when the key was created.
- created_
by str - (String) The subject who created the key.
- credentials Mapping[str, str]
- (Map) The credentials associated with the key.
- credentials_
json str - (String) The credentials associated with the key in json format.
- crn str
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted_
at str - (Timestamp) The date when the key was deleted.
- deleted_
by str - (String) The subject who deleted the key.
- guid str
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam_
compatible bool - (String) Specifies whether the key’s credentials support IAM.
- name str
- A descriptive name used to identify a resource key.
- onetime_
credentials bool - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- parameters Mapping[str, str]
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource_
alias_ strid - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource_
group_ strid - (String) The short ID of the resource group.
- resource_
instance_ strid - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource_
instance_ strurl - (String) The relative path to the resource.
- resource_
key_ strid - (String) The unique identifier of the new resource key.
- role str
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - source_
crn str - (String) The CRN of resource instance or alias associated to the key.
- state str
- (String) The state of the key.
- status str
- (String) The status of the resource key.
- Sequence[str]
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts
Resource
Key Timeouts Args - updated_
at str - (Timestamp) The date when the key was last updated.
- updated_
by str - (String) The subject who updated the key.
- url str
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
- account
Id String - (String) An alpha-numeric value identifying the account ID.
- created
At String - (Timestamp) The date when the key was created.
- created
By String - (String) The subject who created the key.
- credentials Map<String>
- (Map) The credentials associated with the key.
- credentials
Json String - (String) The credentials associated with the key in json format.
- crn String
- (String) The full Cloud Resource Name (CRN) associated with the key.
- deleted
At String - (Timestamp) The date when the key was deleted.
- deleted
By String - (String) The subject who deleted the key.
- guid String
- (String) A unique internal identifier GUID managed by the resource controller that corresponds to the key.
- iam
Compatible Boolean - (String) Specifies whether the key’s credentials support IAM.
- name String
- A descriptive name used to identify a resource key.
- onetime
Credentials Boolean - (Bool) A boolean that dictates if the onetime_credentials is true or false.
- parameters Map<String>
- Arbitrary parameters to pass to the resource in JSON format. If you want to create service credentials by using the private service endpoint, include the
service-endpoints = "private"
parameter. - resource
Alias StringId - The ID of the resource alias associated with the resource key. Note Conflicts with
resource_instance_id
. - resource
Group StringId - (String) The short ID of the resource group.
- resource
Instance StringId - The ID of the resource instance associated with the resource key. Note Conflicts with
resource_alias_id
. - resource
Instance StringUrl - (String) The relative path to the resource.
- resource
Key StringId - (String) The unique identifier of the new resource key.
- role String
- The name of the user role. Valid roles are
NONE
,Writer
,Reader
,Manager
,Administrator
,Operator
,Viewer
, andEditor
. This argument is Optional only during creation of service credentials for Cloud Databases and other non-IAM-enabled services and is Required for all other IAM-enabled services. - source
Crn String - (String) The CRN of resource instance or alias associated to the key.
- state String
- (String) The state of the key.
- status String
- (String) The status of the resource key.
- List<String>
- Tags associated with the resource key instance. Note Tags are managed locally and not stored on the IBM Cloud Service Endpoint at this moment.
- timeouts Property Map
- updated
At String - (Timestamp) The date when the key was last updated.
- updated
By String - (String) The subject who updated the key.
- url String
- (String) When you created a new key, a relative URL path is created identifying the location of the key.
Supporting Types
ResourceKeyTimeouts, ResourceKeyTimeoutsArgs
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.