Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.resourcemanager.getPolicies
Explore with Pulumi AI
This data source provides the Resource Manager Policies of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetPoliciesArgs;
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 = ResourcemanagerFunctions.getPolicies(GetPoliciesArgs.builder()
.nameRegex("tftest")
.descriptionRegex("tftest_policy")
.policyType("Custom")
.build());
ctx.export("firstPolicyId", example.applyValue(getPoliciesResult -> getPoliciesResult.policies()[0].id()));
}
}
variables:
example:
fn::invoke:
Function: alicloud:resourcemanager:getPolicies
Arguments:
nameRegex: tftest
descriptionRegex: tftest_policy
policyType: Custom
outputs:
firstPolicyId: ${example.policies[0].id}
Using getPolicies
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 getPolicies(args: GetPoliciesArgs, opts?: InvokeOptions): Promise<GetPoliciesResult>
function getPoliciesOutput(args: GetPoliciesOutputArgs, opts?: InvokeOptions): Output<GetPoliciesResult>
def get_policies(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
policy_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
def get_policies_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]
func GetPolicies(ctx *Context, args *GetPoliciesArgs, opts ...InvokeOption) (*GetPoliciesResult, error)
func GetPoliciesOutput(ctx *Context, args *GetPoliciesOutputArgs, opts ...InvokeOption) GetPoliciesResultOutput
> Note: This function is named GetPolicies
in the Go SDK.
public static class GetPolicies
{
public static Task<GetPoliciesResult> InvokeAsync(GetPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetPoliciesResult> Invoke(GetPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:resourcemanager/getPolicies:getPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Resource Manager Policy IDs.
- Name
Regex string - A regex string to filter results by policy name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Policy
Type string - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
.
- Ids []string
- A list of Resource Manager Policy IDs.
- Name
Regex string - A regex string to filter results by policy name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Policy
Type string - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
.
- ids List<String>
- A list of Resource Manager Policy IDs.
- name
Regex String - A regex string to filter results by policy name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - policy
Type String - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
.
- ids string[]
- A list of Resource Manager Policy IDs.
- name
Regex string - A regex string to filter results by policy name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - policy
Type string - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
.
- ids Sequence[str]
- A list of Resource Manager Policy IDs.
- name_
regex str - A regex string to filter results by policy name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - policy_
type str - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
.
- ids List<String>
- A list of Resource Manager Policy IDs.
- name
Regex String - A regex string to filter results by policy name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - policy
Type String - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
.
getPolicies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of policy IDs.
- Names List<string>
- A list of policy names.
- Policies
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Policies Policy> - A list of policies. Each element contains the following attributes:
- Name
Regex string - Output
File string - Policy
Type string - The type of the policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of policy IDs.
- Names []string
- A list of policy names.
- Policies
[]Get
Policies Policy - A list of policies. Each element contains the following attributes:
- Name
Regex string - Output
File string - Policy
Type string - The type of the policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of policy IDs.
- names List<String>
- A list of policy names.
- policies
List<Get
Policies Policy> - A list of policies. Each element contains the following attributes:
- name
Regex String - output
File String - policy
Type String - The type of the policy.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of policy IDs.
- names string[]
- A list of policy names.
- policies
Get
Policies Policy[] - A list of policies. Each element contains the following attributes:
- name
Regex string - output
File string - policy
Type string - The type of the policy.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of policy IDs.
- names Sequence[str]
- A list of policy names.
- policies
Sequence[Get
Policies Policy] - A list of policies. Each element contains the following attributes:
- name_
regex str - output_
file str - policy_
type str - The type of the policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of policy IDs.
- names List<String>
- A list of policy names.
- policies List<Property Map>
- A list of policies. Each element contains the following attributes:
- name
Regex String - output
File String - policy
Type String - The type of the policy.
Supporting Types
GetPoliciesPolicy
- Attachment
Count int - The number of times the policy is referenced.
- Default
Version string - The default version of the policy.
- Description string
- The description of the policy.
- Id string
- The ID of the policy.
- Policy
Name string - The name of the policy.
- Policy
Type string - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
. - Update
Date string - The time when the policy was updated.
- Attachment
Count int - The number of times the policy is referenced.
- Default
Version string - The default version of the policy.
- Description string
- The description of the policy.
- Id string
- The ID of the policy.
- Policy
Name string - The name of the policy.
- Policy
Type string - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
. - Update
Date string - The time when the policy was updated.
- attachment
Count Integer - The number of times the policy is referenced.
- default
Version String - The default version of the policy.
- description String
- The description of the policy.
- id String
- The ID of the policy.
- policy
Name String - The name of the policy.
- policy
Type String - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
. - update
Date String - The time when the policy was updated.
- attachment
Count number - The number of times the policy is referenced.
- default
Version string - The default version of the policy.
- description string
- The description of the policy.
- id string
- The ID of the policy.
- policy
Name string - The name of the policy.
- policy
Type string - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
. - update
Date string - The time when the policy was updated.
- attachment_
count int - The number of times the policy is referenced.
- default_
version str - The default version of the policy.
- description str
- The description of the policy.
- id str
- The ID of the policy.
- policy_
name str - The name of the policy.
- policy_
type str - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
. - update_
date str - The time when the policy was updated.
- attachment
Count Number - The number of times the policy is referenced.
- default
Version String - The default version of the policy.
- description String
- The description of the policy.
- id String
- The ID of the policy.
- policy
Name String - The name of the policy.
- policy
Type String - The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
Custom
andSystem
. - update
Date String - The time when the policy was updated.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.