1. Packages
  2. Openstack Provider
  3. API Docs
  4. sharedfilesystem
  5. getShare
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.sharedfilesystem.getShare

Explore with Pulumi AI

OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

Use this data source to get the ID of an available Shared File System share.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const share1 = openstack.sharedfilesystem.getShare({
    name: "share_1",
});
Copy
import pulumi
import pulumi_openstack as openstack

share1 = openstack.sharedfilesystem.get_share(name="share_1")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/sharedfilesystem"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sharedfilesystem.LookupShare(ctx, &sharedfilesystem.LookupShareArgs{
			Name: pulumi.StringRef("share_1"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var share1 = OpenStack.SharedFileSystem.GetShare.Invoke(new()
    {
        Name = "share_1",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.sharedfilesystem.SharedfilesystemFunctions;
import com.pulumi.openstack.sharedfilesystem.inputs.GetShareArgs;
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 share1 = SharedfilesystemFunctions.getShare(GetShareArgs.builder()
            .name("share_1")
            .build());

    }
}
Copy
variables:
  share1:
    fn::invoke:
      Function: openstack:sharedfilesystem:getShare
      Arguments:
        name: share_1
Copy

Using getShare

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 getShare(args: GetShareArgs, opts?: InvokeOptions): Promise<GetShareResult>
function getShareOutput(args: GetShareOutputArgs, opts?: InvokeOptions): Output<GetShareResult>
Copy
def get_share(description: Optional[str] = None,
              export_location_path: Optional[str] = None,
              is_public: Optional[bool] = None,
              metadata: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None,
              region: Optional[str] = None,
              share_network_id: Optional[str] = None,
              snapshot_id: Optional[str] = None,
              status: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetShareResult
def get_share_output(description: Optional[pulumi.Input[str]] = None,
              export_location_path: Optional[pulumi.Input[str]] = None,
              is_public: Optional[pulumi.Input[bool]] = None,
              metadata: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              name: Optional[pulumi.Input[str]] = None,
              region: Optional[pulumi.Input[str]] = None,
              share_network_id: Optional[pulumi.Input[str]] = None,
              snapshot_id: Optional[pulumi.Input[str]] = None,
              status: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetShareResult]
Copy
func LookupShare(ctx *Context, args *LookupShareArgs, opts ...InvokeOption) (*LookupShareResult, error)
func LookupShareOutput(ctx *Context, args *LookupShareOutputArgs, opts ...InvokeOption) LookupShareResultOutput
Copy

> Note: This function is named LookupShare in the Go SDK.

public static class GetShare 
{
    public static Task<GetShareResult> InvokeAsync(GetShareArgs args, InvokeOptions? opts = null)
    public static Output<GetShareResult> Invoke(GetShareInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Copy
fn::invoke:
  function: openstack:sharedfilesystem/getShare:getShare
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Description string
The human-readable description for the share.
ExportLocationPath string
The export location path of the share. Available since Manila API version 2.35.
IsPublic bool
The level of visibility for the share. length.
Metadata Dictionary<string, string>
One or more metadata key and value pairs as a dictionary of strings.
Name string
The name of the share.
Region string
The region in which to obtain the V2 Shared File System client.
ShareNetworkId string
The UUID of the share's share network.
SnapshotId string
The UUID of the share's base snapshot.
Status string
A share status filter. A valid value is creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, or shrinking_possible_data_loss_error.
Description string
The human-readable description for the share.
ExportLocationPath string
The export location path of the share. Available since Manila API version 2.35.
IsPublic bool
The level of visibility for the share. length.
Metadata map[string]string
One or more metadata key and value pairs as a dictionary of strings.
Name string
The name of the share.
Region string
The region in which to obtain the V2 Shared File System client.
ShareNetworkId string
The UUID of the share's share network.
SnapshotId string
The UUID of the share's base snapshot.
Status string
A share status filter. A valid value is creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, or shrinking_possible_data_loss_error.
description String
The human-readable description for the share.
exportLocationPath String
The export location path of the share. Available since Manila API version 2.35.
isPublic Boolean
The level of visibility for the share. length.
metadata Map<String,String>
One or more metadata key and value pairs as a dictionary of strings.
name String
The name of the share.
region String
The region in which to obtain the V2 Shared File System client.
shareNetworkId String
The UUID of the share's share network.
snapshotId String
The UUID of the share's base snapshot.
status String
A share status filter. A valid value is creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, or shrinking_possible_data_loss_error.
description string
The human-readable description for the share.
exportLocationPath string
The export location path of the share. Available since Manila API version 2.35.
isPublic boolean
The level of visibility for the share. length.
metadata {[key: string]: string}
One or more metadata key and value pairs as a dictionary of strings.
name string
The name of the share.
region string
The region in which to obtain the V2 Shared File System client.
shareNetworkId string
The UUID of the share's share network.
snapshotId string
The UUID of the share's base snapshot.
status string
A share status filter. A valid value is creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, or shrinking_possible_data_loss_error.
description str
The human-readable description for the share.
export_location_path str
The export location path of the share. Available since Manila API version 2.35.
is_public bool
The level of visibility for the share. length.
metadata Mapping[str, str]
One or more metadata key and value pairs as a dictionary of strings.
name str
The name of the share.
region str
The region in which to obtain the V2 Shared File System client.
share_network_id str
The UUID of the share's share network.
snapshot_id str
The UUID of the share's base snapshot.
status str
A share status filter. A valid value is creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, or shrinking_possible_data_loss_error.
description String
The human-readable description for the share.
exportLocationPath String
The export location path of the share. Available since Manila API version 2.35.
isPublic Boolean
The level of visibility for the share. length.
metadata Map<String>
One or more metadata key and value pairs as a dictionary of strings.
name String
The name of the share.
region String
The region in which to obtain the V2 Shared File System client.
shareNetworkId String
The UUID of the share's share network.
snapshotId String
The UUID of the share's base snapshot.
status String
A share status filter. A valid value is creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, or shrinking_possible_data_loss_error.

getShare Result

The following output properties are available:

AvailabilityZone string
The share availability zone.
Description string
See Argument Reference above.
ExportLocations List<Pulumi.OpenStack.SharedFileSystem.Outputs.GetShareExportLocation>
A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
Id string
The provider-assigned unique ID for this managed resource.
IsPublic bool
See Argument Reference above.
Metadata Dictionary<string, string>
See Argument Reference above.
Name string
See Argument Reference above.
ProjectId string
See Argument Reference above.
Region string
The region in which to obtain the V2 Shared File System client.
ShareNetworkId string
See Argument Reference above.
ShareProto string
The share protocol.
Size int
The share size, in GBs.
SnapshotId string
See Argument Reference above.
Status string
See Argument Reference above.
ExportLocationPath string
See Argument Reference above.
AvailabilityZone string
The share availability zone.
Description string
See Argument Reference above.
ExportLocations []GetShareExportLocation
A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
Id string
The provider-assigned unique ID for this managed resource.
IsPublic bool
See Argument Reference above.
Metadata map[string]string
See Argument Reference above.
Name string
See Argument Reference above.
ProjectId string
See Argument Reference above.
Region string
The region in which to obtain the V2 Shared File System client.
ShareNetworkId string
See Argument Reference above.
ShareProto string
The share protocol.
Size int
The share size, in GBs.
SnapshotId string
See Argument Reference above.
Status string
See Argument Reference above.
ExportLocationPath string
See Argument Reference above.
availabilityZone String
The share availability zone.
description String
See Argument Reference above.
exportLocations List<GetShareExportLocation>
A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
id String
The provider-assigned unique ID for this managed resource.
isPublic Boolean
See Argument Reference above.
metadata Map<String,String>
See Argument Reference above.
name String
See Argument Reference above.
projectId String
See Argument Reference above.
region String
The region in which to obtain the V2 Shared File System client.
shareNetworkId String
See Argument Reference above.
shareProto String
The share protocol.
size Integer
The share size, in GBs.
snapshotId String
See Argument Reference above.
status String
See Argument Reference above.
exportLocationPath String
See Argument Reference above.
availabilityZone string
The share availability zone.
description string
See Argument Reference above.
exportLocations GetShareExportLocation[]
A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
id string
The provider-assigned unique ID for this managed resource.
isPublic boolean
See Argument Reference above.
metadata {[key: string]: string}
See Argument Reference above.
name string
See Argument Reference above.
projectId string
See Argument Reference above.
region string
The region in which to obtain the V2 Shared File System client.
shareNetworkId string
See Argument Reference above.
shareProto string
The share protocol.
size number
The share size, in GBs.
snapshotId string
See Argument Reference above.
status string
See Argument Reference above.
exportLocationPath string
See Argument Reference above.
availability_zone str
The share availability zone.
description str
See Argument Reference above.
export_locations Sequence[GetShareExportLocation]
A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
id str
The provider-assigned unique ID for this managed resource.
is_public bool
See Argument Reference above.
metadata Mapping[str, str]
See Argument Reference above.
name str
See Argument Reference above.
project_id str
See Argument Reference above.
region str
The region in which to obtain the V2 Shared File System client.
share_network_id str
See Argument Reference above.
share_proto str
The share protocol.
size int
The share size, in GBs.
snapshot_id str
See Argument Reference above.
status str
See Argument Reference above.
export_location_path str
See Argument Reference above.
availabilityZone String
The share availability zone.
description String
See Argument Reference above.
exportLocations List<Property Map>
A list of export locations. For example, when a share server has more than one network interface, it can have multiple export locations.
id String
The provider-assigned unique ID for this managed resource.
isPublic Boolean
See Argument Reference above.
metadata Map<String>
See Argument Reference above.
name String
See Argument Reference above.
projectId String
See Argument Reference above.
region String
The region in which to obtain the V2 Shared File System client.
shareNetworkId String
See Argument Reference above.
shareProto String
The share protocol.
size Number
The share size, in GBs.
snapshotId String
See Argument Reference above.
status String
See Argument Reference above.
exportLocationPath String
See Argument Reference above.

Supporting Types

GetShareExportLocation

Path This property is required. string
Preferred This property is required. string
Path This property is required. string
Preferred This property is required. string
path This property is required. String
preferred This property is required. String
path This property is required. string
preferred This property is required. string
path This property is required. str
preferred This property is required. str
path This property is required. String
preferred This property is required. String

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi