Early Access: Lock functionality is in early access and may not be available to all users.
Important Only unrestricted users can view locks. Restricted users cannot access lock information even if they have permissions for the resource.
Provides information about a Linode Lock. Locks prevent accidental deletion, rebuild operations, and service transfers of resources.
For more information, see the Linode APIv4 docs (TBD).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const myLock = linode.getLock({
id: 123456,
});
import pulumi
import pulumi_linode as linode
my_lock = linode.get_lock(id=123456)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v5/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := linode.LookupLock(ctx, &linode.LookupLockArgs{
Id: 123456,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var myLock = Linode.GetLock.Invoke(new()
{
Id = 123456,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetLockArgs;
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 myLock = LinodeFunctions.getLock(GetLockArgs.builder()
.id(123456)
.build());
}
}
variables:
myLock:
fn::invoke:
function: linode:getLock
arguments:
id: 123456
Using getLock
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLock(args: GetLockArgs, opts?: InvokeOptions): Promise<GetLockResult>
function getLockOutput(args: GetLockOutputArgs, opts?: InvokeOptions): Output<GetLockResult>def get_lock(id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetLockResult
def get_lock_output(id: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLockResult]func LookupLock(ctx *Context, args *LookupLockArgs, opts ...InvokeOption) (*LookupLockResult, error)
func LookupLockOutput(ctx *Context, args *LookupLockOutputArgs, opts ...InvokeOption) LookupLockResultOutput> Note: This function is named LookupLock in the Go SDK.
public static class GetLock
{
public static Task<GetLockResult> InvokeAsync(GetLockArgs args, InvokeOptions? opts = null)
public static Output<GetLockResult> Invoke(GetLockInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLockResult> getLock(GetLockArgs args, InvokeOptions options)
public static Output<GetLockResult> getLock(GetLockArgs args, InvokeOptions options)
fn::invoke:
function: linode:index/getLock:getLock
arguments:
# arguments dictionaryThe following arguments are supported:
- Id int
- The unique ID of the Lock.
- Id int
- The unique ID of the Lock.
- id Integer
- The unique ID of the Lock.
- id number
- The unique ID of the Lock.
- id int
- The unique ID of the Lock.
- id Number
- The unique ID of the Lock.
getLock Result
The following output properties are available:
- Entity
Id int - The ID of the locked entity.
- Entity
Label string - The label of the locked entity.
- Entity
Type string - The type of the locked entity.
- Entity
Url string - The URL of the locked entity.
- Id int
- Lock
Type string - The type of lock.
- Entity
Id int - The ID of the locked entity.
- Entity
Label string - The label of the locked entity.
- Entity
Type string - The type of the locked entity.
- Entity
Url string - The URL of the locked entity.
- Id int
- Lock
Type string - The type of lock.
- entity
Id Integer - The ID of the locked entity.
- entity
Label String - The label of the locked entity.
- entity
Type String - The type of the locked entity.
- entity
Url String - The URL of the locked entity.
- id Integer
- lock
Type String - The type of lock.
- entity
Id number - The ID of the locked entity.
- entity
Label string - The label of the locked entity.
- entity
Type string - The type of the locked entity.
- entity
Url string - The URL of the locked entity.
- id number
- lock
Type string - The type of lock.
- entity_
id int - The ID of the locked entity.
- entity_
label str - The label of the locked entity.
- entity_
type str - The type of the locked entity.
- entity_
url str - The URL of the locked entity.
- id int
- lock_
type str - The type of lock.
- entity
Id Number - The ID of the locked entity.
- entity
Label String - The label of the locked entity.
- entity
Type String - The type of the locked entity.
- entity
Url String - The URL of the locked entity.
- id Number
- lock
Type String - The type of lock.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.
