import * as pulumi from "@pulumi/pulumi"; /** * Manages a Certificate within an API Management Workspace. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleService = new azure.apimanagement.Service("example", { * name: "example-apim", * location: example.location, * resourceGroupName: example.name, * publisherName: "My Company", * publisherEmail: "company@terraform.io", * skuName: "Premium_1", * }); * const exampleWorkspace = new azure.apimanagement.Workspace("example", { * name: "example-workspace", * apiManagementId: exampleService.id, * displayName: "Example Workspace", * }); * const exampleWorkspaceCertificate = new azure.apimanagement.WorkspaceCertificate("example", { * name: "example-cert", * apiManagementWorkspaceId: exampleWorkspace.id, * certificateDataBase64: std.filebase64({ * input: "example.pfx", * }).then(invoke => invoke.result), * password: "terraform", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.ApiManagement` - 2024-05-01 * * ## Import * * API Management Workspace Certificates can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:apimanagement/workspaceCertificate:WorkspaceCertificate example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/workspaces/workspace1/certificates/certificate1 * ``` */ export declare class WorkspaceCertificate extends pulumi.CustomResource { /** * Get an existing WorkspaceCertificate resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: WorkspaceCertificateState, opts?: pulumi.CustomResourceOptions): WorkspaceCertificate; /** * Returns true if the given object is an instance of WorkspaceCertificate. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is WorkspaceCertificate; /** * Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created. */ readonly apiManagementWorkspaceId: pulumi.Output; /** * Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format. * * > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified. */ readonly certificateDataBase64: pulumi.Output; /** * The expiration date of the API Management Workspace Certificate. */ readonly expiration: pulumi.Output; /** * Specifies the ID of the key vault secret. * * > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified. */ readonly keyVaultSecretId: pulumi.Output; /** * Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * Specifies the password used to access the `certificateDataBase64`. */ readonly password: pulumi.Output; /** * The subject name of the API Management Workspace Certificate. */ readonly subject: pulumi.Output; /** * The thumbprint of the API Management Workspace Certificate. */ readonly thumbprint: pulumi.Output; /** * Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`. */ readonly userAssignedIdentityClientId: pulumi.Output; /** * Create a WorkspaceCertificate resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: WorkspaceCertificateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering WorkspaceCertificate resources. */ export interface WorkspaceCertificateState { /** * Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created. */ apiManagementWorkspaceId?: pulumi.Input; /** * Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format. * * > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified. */ certificateDataBase64?: pulumi.Input; /** * The expiration date of the API Management Workspace Certificate. */ expiration?: pulumi.Input; /** * Specifies the ID of the key vault secret. * * > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified. */ keyVaultSecretId?: pulumi.Input; /** * Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the password used to access the `certificateDataBase64`. */ password?: pulumi.Input; /** * The subject name of the API Management Workspace Certificate. */ subject?: pulumi.Input; /** * The thumbprint of the API Management Workspace Certificate. */ thumbprint?: pulumi.Input; /** * Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`. */ userAssignedIdentityClientId?: pulumi.Input; } /** * The set of arguments for constructing a WorkspaceCertificate resource. */ export interface WorkspaceCertificateArgs { /** * Specifies the ID of the API Management Workspace. Changing this forces a new resource to be created. */ apiManagementWorkspaceId: pulumi.Input; /** * Specifies the base64-encoded string containing the certificate in PKCS#12 (.pfx) format. * * > **Note:** This is required when `password` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified. */ certificateDataBase64?: pulumi.Input; /** * Specifies the ID of the key vault secret. * * > **Note:** This is required when `userAssignedIdentityClientId` is specified. Exactly one of `certificateDataBase64` or `keyVaultSecretId` must be specified. */ keyVaultSecretId?: pulumi.Input; /** * Specifies the name of the API Management Workspace Certificate. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * Specifies the password used to access the `certificateDataBase64`. */ password?: pulumi.Input; /** * Specifies the client ID of user-assigned identity to be used for accessing the `keyVaultSecretId`. */ userAssignedIdentityClientId?: pulumi.Input; }