1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getShare
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getShare

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    The Share data source can be used to search for and return an existing share object. You need to provide the group_id and resource_id to get the group resources for the shared resource. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getShare({
        groupId: "group_id",
        resourceId: "resource_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_share(group_id="group_id",
        resource_id="resource_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupShare(ctx, &ionoscloud.LookupShareArgs{
    			GroupId:    "group_id",
    			ResourceId: "resource_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.GetShare.Invoke(new()
        {
            GroupId = "group_id",
            ResourceId = "resource_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.IonoscloudFunctions;
    import com.pulumi.ionoscloud.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 example = IonoscloudFunctions.getShare(GetShareArgs.builder()
                .groupId("group_id")
                .resourceId("resource_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getShare
          arguments:
            groupId: group_id
            resourceId: resource_id
    

    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(group_id: Optional[str] = None,
                  resource_id: Optional[str] = None,
                  timeouts: Optional[GetShareTimeouts] = None,
                  opts: Optional[InvokeOptions] = None) -> GetShareResult
    def get_share_output(group_id: Optional[pulumi.Input[str]] = None,
                  resource_id: Optional[pulumi.Input[str]] = None,
                  timeouts: Optional[pulumi.Input[GetShareTimeoutsArgs]] = 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: ionoscloud:index/getShare:getShare
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupId string
    The ID of the specific group containing the resource to update.
    ResourceId string

    The ID of the specific resource to update.

    resource_id and group_id must be provided. If any of them are missing, the datasource will return an error.

    Timeouts GetShareTimeouts
    GroupId string
    The ID of the specific group containing the resource to update.
    ResourceId string

    The ID of the specific resource to update.

    resource_id and group_id must be provided. If any of them are missing, the datasource will return an error.

    Timeouts GetShareTimeouts
    groupId String
    The ID of the specific group containing the resource to update.
    resourceId String

    The ID of the specific resource to update.

    resource_id and group_id must be provided. If any of them are missing, the datasource will return an error.

    timeouts GetShareTimeouts
    groupId string
    The ID of the specific group containing the resource to update.
    resourceId string

    The ID of the specific resource to update.

    resource_id and group_id must be provided. If any of them are missing, the datasource will return an error.

    timeouts GetShareTimeouts
    group_id str
    The ID of the specific group containing the resource to update.
    resource_id str

    The ID of the specific resource to update.

    resource_id and group_id must be provided. If any of them are missing, the datasource will return an error.

    timeouts GetShareTimeouts
    groupId String
    The ID of the specific group containing the resource to update.
    resourceId String

    The ID of the specific resource to update.

    resource_id and group_id must be provided. If any of them are missing, the datasource will return an error.

    timeouts Property Map

    getShare Result

    The following output properties are available:

    EditPrivilege bool
    The flag that specifies if the group has permission to edit privileges on this resource.
    GroupId string
    The ID of the specific group containing the resource to update.
    Id string
    The id of the share resource.
    ResourceId string
    The ID of the specific resource to update.
    SharePrivilege bool
    The group has permission to share this resource.
    Timeouts GetShareTimeouts
    EditPrivilege bool
    The flag that specifies if the group has permission to edit privileges on this resource.
    GroupId string
    The ID of the specific group containing the resource to update.
    Id string
    The id of the share resource.
    ResourceId string
    The ID of the specific resource to update.
    SharePrivilege bool
    The group has permission to share this resource.
    Timeouts GetShareTimeouts
    editPrivilege Boolean
    The flag that specifies if the group has permission to edit privileges on this resource.
    groupId String
    The ID of the specific group containing the resource to update.
    id String
    The id of the share resource.
    resourceId String
    The ID of the specific resource to update.
    sharePrivilege Boolean
    The group has permission to share this resource.
    timeouts GetShareTimeouts
    editPrivilege boolean
    The flag that specifies if the group has permission to edit privileges on this resource.
    groupId string
    The ID of the specific group containing the resource to update.
    id string
    The id of the share resource.
    resourceId string
    The ID of the specific resource to update.
    sharePrivilege boolean
    The group has permission to share this resource.
    timeouts GetShareTimeouts
    edit_privilege bool
    The flag that specifies if the group has permission to edit privileges on this resource.
    group_id str
    The ID of the specific group containing the resource to update.
    id str
    The id of the share resource.
    resource_id str
    The ID of the specific resource to update.
    share_privilege bool
    The group has permission to share this resource.
    timeouts GetShareTimeouts
    editPrivilege Boolean
    The flag that specifies if the group has permission to edit privileges on this resource.
    groupId String
    The ID of the specific group containing the resource to update.
    id String
    The id of the share resource.
    resourceId String
    The ID of the specific resource to update.
    sharePrivilege Boolean
    The group has permission to share this resource.
    timeouts Property Map

    Supporting Types

    GetShareTimeouts

    Create string
    Default string
    Delete string
    Update string
    Create string
    Default string
    Delete string
    Update string
    create String
    default_ String
    delete String
    update String
    create string
    default string
    delete string
    update string
    create String
    default String
    delete String
    update String

    Package Details

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