OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 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/v4/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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:sharedfilesystem/getShare:getShare
arguments:
# arguments dictionary
The following arguments are supported:
- Description string
- The human-readable description for the share.
- Export
Location stringPath - 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 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.
- Snapshot
Id 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.
- Export
Location stringPath - 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 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.
- Snapshot
Id 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.
- export
Location StringPath - The export location path of the share. Available since Manila API version 2.35.
- is
Public 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.
- snapshot
Id 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.
- export
Location stringPath - The export location path of the share. Available since Manila API version 2.35.
- is
Public 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.
- snapshot
Id 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.
- export
Location StringPath - The export location path of the share. Available since Manila API version 2.35.
- is
Public 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.
- snapshot
Id 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:
- Availability
Zone string - The share availability zone.
- Description string
- See Argument Reference above.
- Export
Locations 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.
- Is
Public bool - See Argument Reference above.
- Metadata Dictionary<string, string>
- See Argument Reference above.
- Name string
- See Argument Reference above.
- Project
Id 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.
- Snapshot
Id string - See Argument Reference above.
- Status string
- See Argument Reference above.
- Export
Location stringPath - See Argument Reference above.
- Availability
Zone string - The share availability zone.
- Description string
- See Argument Reference above.
- Export
Locations []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.
- Is
Public bool - See Argument Reference above.
- Metadata map[string]string
- See Argument Reference above.
- Name string
- See Argument Reference above.
- Project
Id 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.
- Snapshot
Id string - See Argument Reference above.
- Status string
- See Argument Reference above.
- Export
Location stringPath - See Argument Reference above.
- availability
Zone String - The share availability zone.
- description String
- See Argument Reference above.
- export
Locations 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.
- is
Public Boolean - See Argument Reference above.
- metadata Map<String,String>
- See Argument Reference above.
- name String
- See Argument Reference above.
- project
Id 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.
- snapshot
Id String - See Argument Reference above.
- status String
- See Argument Reference above.
- export
Location StringPath - See Argument Reference above.
- availability
Zone string - The share availability zone.
- description string
- See Argument Reference above.
- export
Locations 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.
- is
Public boolean - See Argument Reference above.
- metadata {[key: string]: string}
- See Argument Reference above.
- name string
- See Argument Reference above.
- project
Id 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.
- snapshot
Id string - See Argument Reference above.
- status string
- See Argument Reference above.
- export
Location 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.
- availability
Zone String - The share availability zone.
- description String
- See Argument Reference above.
- export
Locations 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.
- is
Public Boolean - See Argument Reference above.
- metadata Map<String>
- See Argument Reference above.
- name String
- See Argument Reference above.
- project
Id 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.
- snapshot
Id String - See Argument Reference above.
- status String
- See Argument Reference above.
- export
Location 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
openstack
Terraform Provider.