This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
getEntity.go
52 lines (47 loc) · 3.53 KB
/
getEntity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20200201
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func GetEntity(ctx *pulumi.Context, args *GetEntityArgs, opts ...pulumi.InvokeOption) (*GetEntityResult, error) {
var rv GetEntityResult
err := ctx.Invoke("azure-nextgen:management/v20200201:getEntity", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type GetEntityArgs struct {
// The filter parameter allows you to filter on the the name or display name fields. You can check for equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case insensitively.
Filter *string `pulumi:"filter"`
// A filter which allows the get entities call to focus on a particular group (i.e. "$filter=name eq 'groupName'")
GroupName *string `pulumi:"groupName"`
// The $search parameter is used in conjunction with the $filter parameter to return three different outputs depending on the parameter passed in.
// With $search=AllowedParents the API will return the entity info of all groups that the requested entity will be able to reparent to as determined by the user's permissions.
// With $search=AllowedChildren the API will return the entity info of all entities that can be added as children of the requested entity.
// With $search=ParentAndFirstLevelChildren the API will return the parent and first level of children that the user has either direct access to or indirect access via one of their descendants.
// With $search=ParentOnly the API will return only the group if the user has access to at least one of the descendants of the group.
// With $search=ChildrenOnly the API will return only the first level of children of the group entity info specified in $filter. The user must have direct access to the children entities or one of it's descendants for it to show up in the results.
Search *string `pulumi:"search"`
// This parameter specifies the fields to include in the response. Can include any combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter can override select in $skipToken.
Select *string `pulumi:"select"`
// Number of entities to skip over when retrieving results. Passing this in will override $skipToken.
Skip *int `pulumi:"skip"`
// Page continuation token is only used if a previous operation returned a partial result.
// If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.
Skiptoken *string `pulumi:"skiptoken"`
// Number of elements to return when retrieving results. Passing this in will override $skipToken.
Top *int `pulumi:"top"`
// The view parameter allows clients to filter the type of data that is returned by the getEntities call.
View *string `pulumi:"view"`
}
// Describes the result of the request to view entities.
type GetEntityResult struct {
// Total count of records that match the filter
Count int `pulumi:"count"`
// The URL to use for getting the next set of results.
NextLink string `pulumi:"nextLink"`
// The list of entities.
Value []EntityInfoResponse `pulumi:"value"`
}