aws.storagegateway.WorkingStorage
Explore with Pulumi AI
Manages an AWS Storage Gateway working storage.
NOTE: The Storage Gateway API provides no method to remove a working storage disk. Destroying this resource does not perform any Storage Gateway actions.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.storagegateway.WorkingStorage("example", {
diskId: exampleAwsStoragegatewayLocalDisk.id,
gatewayArn: exampleAwsStoragegatewayGateway.arn,
});
import pulumi
import pulumi_aws as aws
example = aws.storagegateway.WorkingStorage("example",
disk_id=example_aws_storagegateway_local_disk["id"],
gateway_arn=example_aws_storagegateway_gateway["arn"])
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/storagegateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := storagegateway.NewWorkingStorage(ctx, "example", &storagegateway.WorkingStorageArgs{
DiskId: pulumi.Any(exampleAwsStoragegatewayLocalDisk.Id),
GatewayArn: pulumi.Any(exampleAwsStoragegatewayGateway.Arn),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.StorageGateway.WorkingStorage("example", new()
{
DiskId = exampleAwsStoragegatewayLocalDisk.Id,
GatewayArn = exampleAwsStoragegatewayGateway.Arn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.WorkingStorage;
import com.pulumi.aws.storagegateway.WorkingStorageArgs;
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 example = new WorkingStorage("example", WorkingStorageArgs.builder()
.diskId(exampleAwsStoragegatewayLocalDisk.id())
.gatewayArn(exampleAwsStoragegatewayGateway.arn())
.build());
}
}
resources:
example:
type: aws:storagegateway:WorkingStorage
properties:
diskId: ${exampleAwsStoragegatewayLocalDisk.id}
gatewayArn: ${exampleAwsStoragegatewayGateway.arn}
Create WorkingStorage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkingStorage(name: string, args: WorkingStorageArgs, opts?: CustomResourceOptions);
@overload
def WorkingStorage(resource_name: str,
args: WorkingStorageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkingStorage(resource_name: str,
opts: Optional[ResourceOptions] = None,
disk_id: Optional[str] = None,
gateway_arn: Optional[str] = None)
func NewWorkingStorage(ctx *Context, name string, args WorkingStorageArgs, opts ...ResourceOption) (*WorkingStorage, error)
public WorkingStorage(string name, WorkingStorageArgs args, CustomResourceOptions? opts = null)
public WorkingStorage(String name, WorkingStorageArgs args)
public WorkingStorage(String name, WorkingStorageArgs args, CustomResourceOptions options)
type: aws:storagegateway:WorkingStorage
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 WorkingStorageArgs
- 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 WorkingStorageArgs
- 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 WorkingStorageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkingStorageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkingStorageArgs
- 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 workingStorageResource = new Aws.StorageGateway.WorkingStorage("workingStorageResource", new()
{
DiskId = "string",
GatewayArn = "string",
});
example, err := storagegateway.NewWorkingStorage(ctx, "workingStorageResource", &storagegateway.WorkingStorageArgs{
DiskId: pulumi.String("string"),
GatewayArn: pulumi.String("string"),
})
var workingStorageResource = new WorkingStorage("workingStorageResource", WorkingStorageArgs.builder()
.diskId("string")
.gatewayArn("string")
.build());
working_storage_resource = aws.storagegateway.WorkingStorage("workingStorageResource",
disk_id="string",
gateway_arn="string")
const workingStorageResource = new aws.storagegateway.WorkingStorage("workingStorageResource", {
diskId: "string",
gatewayArn: "string",
});
type: aws:storagegateway:WorkingStorage
properties:
diskId: string
gatewayArn: string
WorkingStorage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The WorkingStorage resource accepts the following input properties:
- Disk
Id string - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - Gateway
Arn string - The Amazon Resource Name (ARN) of the gateway.
- Disk
Id string - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - Gateway
Arn string - The Amazon Resource Name (ARN) of the gateway.
- disk
Id String - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway
Arn String - The Amazon Resource Name (ARN) of the gateway.
- disk
Id string - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway
Arn string - The Amazon Resource Name (ARN) of the gateway.
- disk_
id str - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway_
arn str - The Amazon Resource Name (ARN) of the gateway.
- disk
Id String - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway
Arn String - The Amazon Resource Name (ARN) of the gateway.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkingStorage resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing WorkingStorage Resource
Get an existing WorkingStorage 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?: WorkingStorageState, opts?: CustomResourceOptions): WorkingStorage
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
disk_id: Optional[str] = None,
gateway_arn: Optional[str] = None) -> WorkingStorage
func GetWorkingStorage(ctx *Context, name string, id IDInput, state *WorkingStorageState, opts ...ResourceOption) (*WorkingStorage, error)
public static WorkingStorage Get(string name, Input<string> id, WorkingStorageState? state, CustomResourceOptions? opts = null)
public static WorkingStorage get(String name, Output<String> id, WorkingStorageState 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.
- Disk
Id string - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - Gateway
Arn string - The Amazon Resource Name (ARN) of the gateway.
- Disk
Id string - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - Gateway
Arn string - The Amazon Resource Name (ARN) of the gateway.
- disk
Id String - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway
Arn String - The Amazon Resource Name (ARN) of the gateway.
- disk
Id string - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway
Arn string - The Amazon Resource Name (ARN) of the gateway.
- disk_
id str - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway_
arn str - The Amazon Resource Name (ARN) of the gateway.
- disk
Id String - Local disk identifier. For example,
pci-0000:03:00.0-scsi-0:0:0:0
. - gateway
Arn String - The Amazon Resource Name (ARN) of the gateway.
Import
Using pulumi import
, import aws_storagegateway_working_storage
using the gateway Amazon Resource Name (ARN) and local disk identifier separated with a colon (:
). For example:
$ pulumi import aws:storagegateway/workingStorage:WorkingStorage example arn:aws:storagegateway:us-east-1:123456789012:gateway/sgw-12345678:pci-0000:03:00.0-scsi-0:0:0:0
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.