Volcengine v0.0.31 published on Monday, May 12, 2025 by Volcengine
volcengine.iam.UserGroupPolicyAttachments
Explore with Pulumi AI
Deprecated: volcengine.iam.UserGroupPolicyAttachments has been deprecated in favor of volcengine.iam.getUserGroupPolicyAttachments
Use this data source to query detailed information of iam user group policy attachments
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooPolicy = new volcengine.iam.Policy("fooPolicy", {
policyName: "acc-test-policy",
description: "acc-test",
policyDocument: "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
});
const fooUserGroup = new volcengine.iam.UserGroup("fooUserGroup", {
userGroupName: "acc-test-group",
description: "acc-test",
displayName: "acc-test",
});
const fooUserGroupPolicyAttachment = new volcengine.iam.UserGroupPolicyAttachment("fooUserGroupPolicyAttachment", {
policyName: fooPolicy.policyName,
policyType: "Custom",
userGroupName: fooUserGroup.userGroupName,
});
const fooUserGroupPolicyAttachments = volcengine.iam.getUserGroupPolicyAttachmentsOutput({
userGroupName: fooUserGroupPolicyAttachment.userGroupName,
});
import pulumi
import pulumi_volcengine as volcengine
foo_policy = volcengine.iam.Policy("fooPolicy",
policy_name="acc-test-policy",
description="acc-test",
policy_document="{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}")
foo_user_group = volcengine.iam.UserGroup("fooUserGroup",
user_group_name="acc-test-group",
description="acc-test",
display_name="acc-test")
foo_user_group_policy_attachment = volcengine.iam.UserGroupPolicyAttachment("fooUserGroupPolicyAttachment",
policy_name=foo_policy.policy_name,
policy_type="Custom",
user_group_name=foo_user_group.user_group_name)
foo_user_group_policy_attachments = volcengine.iam.get_user_group_policy_attachments_output(user_group_name=foo_user_group_policy_attachment.user_group_name)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/iam"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooPolicy, err := iam.NewPolicy(ctx, "fooPolicy", &iam.PolicyArgs{
PolicyName: pulumi.String("acc-test-policy"),
Description: pulumi.String("acc-test"),
PolicyDocument: pulumi.String("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}"),
})
if err != nil {
return err
}
fooUserGroup, err := iam.NewUserGroup(ctx, "fooUserGroup", &iam.UserGroupArgs{
UserGroupName: pulumi.String("acc-test-group"),
Description: pulumi.String("acc-test"),
DisplayName: pulumi.String("acc-test"),
})
if err != nil {
return err
}
fooUserGroupPolicyAttachment, err := iam.NewUserGroupPolicyAttachment(ctx, "fooUserGroupPolicyAttachment", &iam.UserGroupPolicyAttachmentArgs{
PolicyName: fooPolicy.PolicyName,
PolicyType: pulumi.String("Custom"),
UserGroupName: fooUserGroup.UserGroupName,
})
if err != nil {
return err
}
_ = iam.GetUserGroupPolicyAttachmentsOutput(ctx, iam.GetUserGroupPolicyAttachmentsOutputArgs{
UserGroupName: fooUserGroupPolicyAttachment.UserGroupName,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooPolicy = new Volcengine.Iam.Policy("fooPolicy", new()
{
PolicyName = "acc-test-policy",
Description = "acc-test",
PolicyDocument = "{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}",
});
var fooUserGroup = new Volcengine.Iam.UserGroup("fooUserGroup", new()
{
UserGroupName = "acc-test-group",
Description = "acc-test",
DisplayName = "acc-test",
});
var fooUserGroupPolicyAttachment = new Volcengine.Iam.UserGroupPolicyAttachment("fooUserGroupPolicyAttachment", new()
{
PolicyName = fooPolicy.PolicyName,
PolicyType = "Custom",
UserGroupName = fooUserGroup.UserGroupName,
});
var fooUserGroupPolicyAttachments = Volcengine.Iam.GetUserGroupPolicyAttachments.Invoke(new()
{
UserGroupName = fooUserGroupPolicyAttachment.UserGroupName,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.iam.Policy;
import com.pulumi.volcengine.iam.PolicyArgs;
import com.pulumi.volcengine.iam.UserGroup;
import com.pulumi.volcengine.iam.UserGroupArgs;
import com.pulumi.volcengine.iam.UserGroupPolicyAttachment;
import com.pulumi.volcengine.iam.UserGroupPolicyAttachmentArgs;
import com.pulumi.volcengine.iam.IamFunctions;
import com.pulumi.volcengine.iam.inputs.GetUserGroupPolicyAttachmentsArgs;
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 fooPolicy = new Policy("fooPolicy", PolicyArgs.builder()
.policyName("acc-test-policy")
.description("acc-test")
.policyDocument("{\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"auto_scaling:DescribeScalingGroups\"],\"Resource\":[\"*\"]}]}")
.build());
var fooUserGroup = new UserGroup("fooUserGroup", UserGroupArgs.builder()
.userGroupName("acc-test-group")
.description("acc-test")
.displayName("acc-test")
.build());
var fooUserGroupPolicyAttachment = new UserGroupPolicyAttachment("fooUserGroupPolicyAttachment", UserGroupPolicyAttachmentArgs.builder()
.policyName(fooPolicy.policyName())
.policyType("Custom")
.userGroupName(fooUserGroup.userGroupName())
.build());
final var fooUserGroupPolicyAttachments = IamFunctions.getUserGroupPolicyAttachments(GetUserGroupPolicyAttachmentsArgs.builder()
.userGroupName(fooUserGroupPolicyAttachment.userGroupName())
.build());
}
}
resources:
fooPolicy:
type: volcengine:iam:Policy
properties:
policyName: acc-test-policy
description: acc-test
policyDocument: '{"Statement":[{"Effect":"Allow","Action":["auto_scaling:DescribeScalingGroups"],"Resource":["*"]}]}'
fooUserGroup:
type: volcengine:iam:UserGroup
properties:
userGroupName: acc-test-group
description: acc-test
displayName: acc-test
fooUserGroupPolicyAttachment:
type: volcengine:iam:UserGroupPolicyAttachment
properties:
policyName: ${fooPolicy.policyName}
policyType: Custom
userGroupName: ${fooUserGroup.userGroupName}
variables:
fooUserGroupPolicyAttachments:
fn::invoke:
Function: volcengine:iam:getUserGroupPolicyAttachments
Arguments:
userGroupName: ${fooUserGroupPolicyAttachment.userGroupName}
Using UserGroupPolicyAttachments
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 userGroupPolicyAttachments(args: UserGroupPolicyAttachmentsArgs, opts?: InvokeOptions): Promise<UserGroupPolicyAttachmentsResult>
function userGroupPolicyAttachmentsOutput(args: UserGroupPolicyAttachmentsOutputArgs, opts?: InvokeOptions): Output<UserGroupPolicyAttachmentsResult>
def user_group_policy_attachments(output_file: Optional[str] = None,
user_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> UserGroupPolicyAttachmentsResult
def user_group_policy_attachments_output(output_file: Optional[pulumi.Input[str]] = None,
user_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[UserGroupPolicyAttachmentsResult]
func UserGroupPolicyAttachments(ctx *Context, args *UserGroupPolicyAttachmentsArgs, opts ...InvokeOption) (*UserGroupPolicyAttachmentsResult, error)
func UserGroupPolicyAttachmentsOutput(ctx *Context, args *UserGroupPolicyAttachmentsOutputArgs, opts ...InvokeOption) UserGroupPolicyAttachmentsResultOutput
public static class UserGroupPolicyAttachments
{
public static Task<UserGroupPolicyAttachmentsResult> InvokeAsync(UserGroupPolicyAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<UserGroupPolicyAttachmentsResult> Invoke(UserGroupPolicyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<UserGroupPolicyAttachmentsResult> userGroupPolicyAttachments(UserGroupPolicyAttachmentsArgs args, InvokeOptions options)
public static Output<UserGroupPolicyAttachmentsResult> userGroupPolicyAttachments(UserGroupPolicyAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:iam:UserGroupPolicyAttachments
arguments:
# arguments dictionary
The following arguments are supported:
- User
Group stringName - A name of user group.
- Output
File string - File name where to save data source results.
- User
Group stringName - A name of user group.
- Output
File string - File name where to save data source results.
- user
Group StringName - A name of user group.
- output
File String - File name where to save data source results.
- user
Group stringName - A name of user group.
- output
File string - File name where to save data source results.
- user_
group_ strname - A name of user group.
- output_
file str - File name where to save data source results.
- user
Group StringName - A name of user group.
- output
File String - File name where to save data source results.
UserGroupPolicyAttachments Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Policies
List<User
Group Policy Attachments Policy> - The collection of query.
- Total
Count int - The total count of query.
- User
Group stringName - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Policies
[]User
Group Policy Attachments Policy - The collection of query.
- Total
Count int - The total count of query.
- User
Group stringName - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- policies
List<User
Group Policy Attachments Policy> - The collection of query.
- total
Count Integer - The total count of query.
- user
Group StringName - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- policies
User
Group Policy Attachments Policy[] - The collection of query.
- total
Count number - The total count of query.
- user
Group stringName - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- policies
Sequence[User
Group Policy Attachments Policy] - The collection of query.
- total_
count int - The total count of query.
- user_
group_ strname - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- policies List<Property Map>
- The collection of query.
- total
Count Number - The total count of query.
- user
Group StringName - output
File String
Supporting Types
UserGroupPolicyAttachmentsPolicy
- Attach
Date string - Attached time.
- Description string
- The description.
- Policy
Name string - Name of the policy.
- Policy
Trn string - Resource name of the strategy.
- Policy
Type string - The type of the policy.
- Attach
Date string - Attached time.
- Description string
- The description.
- Policy
Name string - Name of the policy.
- Policy
Trn string - Resource name of the strategy.
- Policy
Type string - The type of the policy.
- attach
Date String - Attached time.
- description String
- The description.
- policy
Name String - Name of the policy.
- policy
Trn String - Resource name of the strategy.
- policy
Type String - The type of the policy.
- attach
Date string - Attached time.
- description string
- The description.
- policy
Name string - Name of the policy.
- policy
Trn string - Resource name of the strategy.
- policy
Type string - The type of the policy.
- attach_
date str - Attached time.
- description str
- The description.
- policy_
name str - Name of the policy.
- policy_
trn str - Resource name of the strategy.
- policy_
type str - The type of the policy.
- attach
Date String - Attached time.
- description String
- The description.
- policy
Name String - Name of the policy.
- policy
Trn String - Resource name of the strategy.
- policy
Type String - The type of the policy.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.