1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsSourceShare
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getIsSourceShare

Explore with Pulumi AI

ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

Provides a read-only data source for the source share. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

Example Usage

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

const exampleIsVpc = new ibm.IsVpc("exampleIsVpc", {});
const exampleIsShare = new ibm.IsShare("exampleIsShare", {
    size: 200,
    profile: "dp2",
    zone: "us-south-2",
});
const example1 = new ibm.IsShare("example1", {
    zone: "us-south-3",
    sourceShare: exampleIsShare.isShareId,
    profile: "tier-3iops",
    replicationCronSpec: "0 */5 * * *",
});
const exampleIsSourceShare = ibm.getIsSourceShareOutput({
    shareReplica: example1.isShareId,
});
Copy
import pulumi
import pulumi_ibm as ibm

example_is_vpc = ibm.IsVpc("exampleIsVpc")
example_is_share = ibm.IsShare("exampleIsShare",
    size=200,
    profile="dp2",
    zone="us-south-2")
example1 = ibm.IsShare("example1",
    zone="us-south-3",
    source_share=example_is_share.is_share_id,
    profile="tier-3iops",
    replication_cron_spec="0 */5 * * *")
example_is_source_share = ibm.get_is_source_share_output(share_replica=example1.is_share_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.NewIsVpc(ctx, "exampleIsVpc", nil)
		if err != nil {
			return err
		}
		exampleIsShare, err := ibm.NewIsShare(ctx, "exampleIsShare", &ibm.IsShareArgs{
			Size:    pulumi.Float64(200),
			Profile: pulumi.String("dp2"),
			Zone:    pulumi.String("us-south-2"),
		})
		if err != nil {
			return err
		}
		example1, err := ibm.NewIsShare(ctx, "example1", &ibm.IsShareArgs{
			Zone:                pulumi.String("us-south-3"),
			SourceShare:         exampleIsShare.IsShareId,
			Profile:             pulumi.String("tier-3iops"),
			ReplicationCronSpec: pulumi.String("0 */5 * * *"),
		})
		if err != nil {
			return err
		}
		_ = ibm.GetIsSourceShareOutput(ctx, ibm.GetIsSourceShareOutputArgs{
			ShareReplica: example1.IsShareId,
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var exampleIsVpc = new Ibm.IsVpc("exampleIsVpc");

    var exampleIsShare = new Ibm.IsShare("exampleIsShare", new()
    {
        Size = 200,
        Profile = "dp2",
        Zone = "us-south-2",
    });

    var example1 = new Ibm.IsShare("example1", new()
    {
        Zone = "us-south-3",
        SourceShare = exampleIsShare.IsShareId,
        Profile = "tier-3iops",
        ReplicationCronSpec = "0 */5 * * *",
    });

    var exampleIsSourceShare = Ibm.GetIsSourceShare.Invoke(new()
    {
        ShareReplica = example1.IsShareId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IsVpc;
import com.pulumi.ibm.IsShare;
import com.pulumi.ibm.IsShareArgs;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetIsSourceShareArgs;
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 exampleIsVpc = new IsVpc("exampleIsVpc");

        var exampleIsShare = new IsShare("exampleIsShare", IsShareArgs.builder()
            .size(200)
            .profile("dp2")
            .zone("us-south-2")
            .build());

        var example1 = new IsShare("example1", IsShareArgs.builder()
            .zone("us-south-3")
            .sourceShare(exampleIsShare.isShareId())
            .profile("tier-3iops")
            .replicationCronSpec("0 */5 * * *")
            .build());

        final var exampleIsSourceShare = IbmFunctions.getIsSourceShare(GetIsSourceShareArgs.builder()
            .shareReplica(example1.isShareId())
            .build());

    }
}
Copy
resources:
  exampleIsVpc:
    type: ibm:IsVpc
  exampleIsShare:
    type: ibm:IsShare
    properties:
      size: 200
      profile: dp2
      zone: us-south-2
  example1:
    type: ibm:IsShare
    properties:
      zone: us-south-3
      sourceShare: ${exampleIsShare.isShareId}
      profile: tier-3iops
      replicationCronSpec: 0 */5 * * *
variables:
  exampleIsSourceShare:
    fn::invoke:
      function: ibm:getIsSourceShare
      arguments:
        shareReplica: ${example1.isShareId}
Copy

Using getIsSourceShare

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 getIsSourceShare(args: GetIsSourceShareArgs, opts?: InvokeOptions): Promise<GetIsSourceShareResult>
function getIsSourceShareOutput(args: GetIsSourceShareOutputArgs, opts?: InvokeOptions): Output<GetIsSourceShareResult>
Copy
def get_is_source_share(id: Optional[str] = None,
                        share_replica: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetIsSourceShareResult
def get_is_source_share_output(id: Optional[pulumi.Input[str]] = None,
                        share_replica: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetIsSourceShareResult]
Copy
func GetIsSourceShare(ctx *Context, args *GetIsSourceShareArgs, opts ...InvokeOption) (*GetIsSourceShareResult, error)
func GetIsSourceShareOutput(ctx *Context, args *GetIsSourceShareOutputArgs, opts ...InvokeOption) GetIsSourceShareResultOutput
Copy

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

public static class GetIsSourceShare 
{
    public static Task<GetIsSourceShareResult> InvokeAsync(GetIsSourceShareArgs args, InvokeOptions? opts = null)
    public static Output<GetIsSourceShareResult> Invoke(GetIsSourceShareInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetIsSourceShareResult> getIsSourceShare(GetIsSourceShareArgs args, InvokeOptions options)
public static Output<GetIsSourceShareResult> getIsSourceShare(GetIsSourceShareArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getIsSourceShare:getIsSourceShare
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ShareReplica This property is required. string

The file share identifier.

Note One of the aurgument is mandatory

Id string
(String) The ID of the file share.
ShareReplica This property is required. string

The file share identifier.

Note One of the aurgument is mandatory

Id string
(String) The ID of the file share.
shareReplica This property is required. String

The file share identifier.

Note One of the aurgument is mandatory

id String
(String) The ID of the file share.
shareReplica This property is required. string

The file share identifier.

Note One of the aurgument is mandatory

id string
(String) The ID of the file share.
share_replica This property is required. str

The file share identifier.

Note One of the aurgument is mandatory

id str
(String) The ID of the file share.
shareReplica This property is required. String

The file share identifier.

Note One of the aurgument is mandatory

id String
(String) The ID of the file share.

getIsSourceShare Result

The following output properties are available:

Crn string
The CRN for this share.
Href string
The URL for this share.
Id string
(String) The ID of the file share.
Name string
The unique user-defined name for this file share.
ResourceType string
The type of resource referenced.
ShareReplica string
Crn string
The CRN for this share.
Href string
The URL for this share.
Id string
(String) The ID of the file share.
Name string
The unique user-defined name for this file share.
ResourceType string
The type of resource referenced.
ShareReplica string
crn String
The CRN for this share.
href String
The URL for this share.
id String
(String) The ID of the file share.
name String
The unique user-defined name for this file share.
resourceType String
The type of resource referenced.
shareReplica String
crn string
The CRN for this share.
href string
The URL for this share.
id string
(String) The ID of the file share.
name string
The unique user-defined name for this file share.
resourceType string
The type of resource referenced.
shareReplica string
crn str
The CRN for this share.
href str
The URL for this share.
id str
(String) The ID of the file share.
name str
The unique user-defined name for this file share.
resource_type str
The type of resource referenced.
share_replica str
crn String
The CRN for this share.
href String
The URL for this share.
id String
(String) The ID of the file share.
name String
The unique user-defined name for this file share.
resourceType String
The type of resource referenced.
shareReplica String

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud