OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi
openstack.sharedfilesystem.getShare
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_openstack as openstack
share1 = openstack.sharedfilesystem.get_share(name="share_1")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  share1:
    fn::invoke:
      function: openstack:sharedfilesystem:getShare
      arguments:
        name: share_1
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>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]func LookupShare(ctx *Context, args *LookupShareArgs, opts ...InvokeOption) (*LookupShareResult, error)
func LookupShareOutput(ctx *Context, args *LookupShareOutputArgs, opts ...InvokeOption) LookupShareResultOutput> 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)
}public static CompletableFuture<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
public static Output<GetShareResult> getShare(GetShareArgs args, InvokeOptions options)
fn::invoke:
  function: openstack:sharedfilesystem/getShare:getShare
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Description string
- The human-readable description for the share.
- ExportLocation stringPath 
- 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.
- 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, orshrinking_possible_data_loss_error.
- Description string
- The human-readable description for the share.
- ExportLocation stringPath 
- 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.
- 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, orshrinking_possible_data_loss_error.
- description String
- The human-readable description for the share.
- exportLocation StringPath 
- 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.
- 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, orshrinking_possible_data_loss_error.
- description string
- The human-readable description for the share.
- exportLocation stringPath 
- 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.
- 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, orshrinking_possible_data_loss_error.
- description str
- The human-readable description for the share.
- export_location_ strpath 
- 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.
- 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, orshrinking_possible_data_loss_error.
- description String
- The human-readable description for the share.
- exportLocation StringPath 
- 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.
- 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, orshrinking_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.Open Stack. Shared File System. Outputs. Get Share Export Location> 
- 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.
- string
- See Argument Reference above.
- string
- The share protocol.
- Size int
- The share size, in GBs.
- SnapshotId string
- See Argument Reference above.
- Status string
- See Argument Reference above.
- ExportLocation stringPath 
- See Argument Reference above.
- AvailabilityZone string
- The share availability zone.
- Description string
- See Argument Reference above.
- ExportLocations []GetShare Export Location 
- 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.
- string
- See Argument Reference above.
- string
- The share protocol.
- Size int
- The share size, in GBs.
- SnapshotId string
- See Argument Reference above.
- Status string
- See Argument Reference above.
- ExportLocation stringPath 
- See Argument Reference above.
- availabilityZone String
- The share availability zone.
- description String
- See Argument Reference above.
- exportLocations List<GetShare Export Location> 
- 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.
- String
- See Argument Reference above.
- String
- The share protocol.
- size Integer
- The share size, in GBs.
- snapshotId String
- See Argument Reference above.
- status String
- See Argument Reference above.
- exportLocation StringPath 
- See Argument Reference above.
- availabilityZone string
- The share availability zone.
- description string
- See Argument Reference above.
- exportLocations GetShare Export Location[] 
- 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.
- string
- See Argument Reference above.
- string
- The share protocol.
- size number
- The share size, in GBs.
- snapshotId string
- See Argument Reference above.
- status string
- See Argument Reference above.
- exportLocation stringPath 
- See Argument Reference above.
- availability_zone str
- The share availability zone.
- description str
- See Argument Reference above.
- export_locations Sequence[GetShare Export Location] 
- 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.
- str
- See Argument Reference above.
- 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_ strpath 
- 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.
- String
- See Argument Reference above.
- String
- The share protocol.
- size Number
- The share size, in GBs.
- snapshotId String
- See Argument Reference above.
- status String
- See Argument Reference above.
- exportLocation StringPath 
- See Argument Reference above.
Supporting Types
GetShareExportLocation   
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the openstackTerraform Provider.