ionoscloud.getShare
Explore with Pulumi AI
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:
- Group
Id string - The ID of the specific group containing the resource to update.
- Resource
Id string The ID of the specific resource to update.
resource_id
andgroup_id
must be provided. If any of them are missing, the datasource will return an error.- Timeouts
Get
Share Timeouts
- Group
Id string - The ID of the specific group containing the resource to update.
- Resource
Id string The ID of the specific resource to update.
resource_id
andgroup_id
must be provided. If any of them are missing, the datasource will return an error.- Timeouts
Get
Share Timeouts
- group
Id String - The ID of the specific group containing the resource to update.
- resource
Id String The ID of the specific resource to update.
resource_id
andgroup_id
must be provided. If any of them are missing, the datasource will return an error.- timeouts
Get
Share Timeouts
- group
Id string - The ID of the specific group containing the resource to update.
- resource
Id string The ID of the specific resource to update.
resource_id
andgroup_id
must be provided. If any of them are missing, the datasource will return an error.- timeouts
Get
Share Timeouts
- 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
andgroup_id
must be provided. If any of them are missing, the datasource will return an error.- timeouts
Get
Share Timeouts
- group
Id String - The ID of the specific group containing the resource to update.
- resource
Id String The ID of the specific resource to update.
resource_id
andgroup_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:
- Edit
Privilege bool - The flag that specifies if the group has permission to edit privileges on this resource.
- Group
Id string - The ID of the specific group containing the resource to update.
- Id string
- The id of the share resource.
- Resource
Id string - The ID of the specific resource to update.
- bool
- The group has permission to share this resource.
- Timeouts
Get
Share Timeouts
- Edit
Privilege bool - The flag that specifies if the group has permission to edit privileges on this resource.
- Group
Id string - The ID of the specific group containing the resource to update.
- Id string
- The id of the share resource.
- Resource
Id string - The ID of the specific resource to update.
- bool
- The group has permission to share this resource.
- Timeouts
Get
Share Timeouts
- edit
Privilege Boolean - The flag that specifies if the group has permission to edit privileges on this resource.
- group
Id String - The ID of the specific group containing the resource to update.
- id String
- The id of the share resource.
- resource
Id String - The ID of the specific resource to update.
- Boolean
- The group has permission to share this resource.
- timeouts
Get
Share Timeouts
- edit
Privilege boolean - The flag that specifies if the group has permission to edit privileges on this resource.
- group
Id string - The ID of the specific group containing the resource to update.
- id string
- The id of the share resource.
- resource
Id string - The ID of the specific resource to update.
- boolean
- The group has permission to share this resource.
- timeouts
Get
Share Timeouts
- 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.
- bool
- The group has permission to share this resource.
- timeouts
Get
Share Timeouts
- edit
Privilege Boolean - The flag that specifies if the group has permission to edit privileges on this resource.
- group
Id String - The ID of the specific group containing the resource to update.
- id String
- The id of the share resource.
- resource
Id String - The ID of the specific resource to update.
- Boolean
- The group has permission to share this resource.
- timeouts Property Map
Supporting Types
GetShareTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.