Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.vpc.getIpamIpamScopes
This data source provides Vpc Ipam Ipam Scope available to the user.What is Ipam Scope
NOTE: Available since v1.241.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.resourcemanager.getResourceGroups({});
const defaultIpam = new alicloud.vpc.IpamIpam("defaultIpam", {
operatingRegionLists: ["cn-hangzhou"],
ipamName: name,
});
const defaultIpamIpamScope = new alicloud.vpc.IpamIpamScope("default", {
ipamScopeName: name,
ipamId: defaultIpam.id,
ipamScopeDescription: "This is a ipam scope.",
ipamScopeType: "private",
tags: {
k1: "v1",
},
});
const defaultGetIpamIpamScopes = defaultIpamIpamScope.ipamScopeName.apply(ipamScopeName => alicloud.vpc.getIpamIpamScopesOutput({
ipamScopeName: ipamScopeName,
}));
export const alicloudVpcIpamIpamScopeExampleId = defaultGetIpamIpamScopes.apply(defaultGetIpamIpamScopes => defaultGetIpamIpamScopes.scopes?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.resourcemanager.get_resource_groups()
default_ipam = alicloud.vpc.IpamIpam("defaultIpam",
operating_region_lists=["cn-hangzhou"],
ipam_name=name)
default_ipam_ipam_scope = alicloud.vpc.IpamIpamScope("default",
ipam_scope_name=name,
ipam_id=default_ipam.id,
ipam_scope_description="This is a ipam scope.",
ipam_scope_type="private",
tags={
"k1": "v1",
})
default_get_ipam_ipam_scopes = default_ipam_ipam_scope.ipam_scope_name.apply(lambda ipam_scope_name: alicloud.vpc.get_ipam_ipam_scopes_output(ipam_scope_name=ipam_scope_name))
pulumi.export("alicloudVpcIpamIpamScopeExampleId", default_get_ipam_ipam_scopes.scopes[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{}, nil)
if err != nil {
return err
}
defaultIpam, err := vpc.NewIpamIpam(ctx, "defaultIpam", &vpc.IpamIpamArgs{
OperatingRegionLists: pulumi.StringArray{
pulumi.String("cn-hangzhou"),
},
IpamName: pulumi.String(name),
})
if err != nil {
return err
}
defaultIpamIpamScope, err := vpc.NewIpamIpamScope(ctx, "default", &vpc.IpamIpamScopeArgs{
IpamScopeName: pulumi.String(name),
IpamId: defaultIpam.ID(),
IpamScopeDescription: pulumi.String("This is a ipam scope."),
IpamScopeType: pulumi.String("private"),
Tags: pulumi.StringMap{
"k1": pulumi.String("v1"),
},
})
if err != nil {
return err
}
defaultGetIpamIpamScopes := defaultIpamIpamScope.IpamScopeName.ApplyT(func(ipamScopeName *string) (vpc.GetIpamIpamScopesResult, error) {
return vpc.GetIpamIpamScopesResult(interface{}(vpc.GetIpamIpamScopesOutput(ctx, vpc.GetIpamIpamScopesOutputArgs{
IpamScopeName: ipamScopeName,
}, nil))), nil
}).(vpc.GetIpamIpamScopesResultOutput)
ctx.Export("alicloudVpcIpamIpamScopeExampleId", defaultGetIpamIpamScopes.ApplyT(func(defaultGetIpamIpamScopes vpc.GetIpamIpamScopesResult) (*string, error) {
return &defaultGetIpamIpamScopes.Scopes[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
var defaultIpam = new AliCloud.Vpc.IpamIpam("defaultIpam", new()
{
OperatingRegionLists = new[]
{
"cn-hangzhou",
},
IpamName = name,
});
var defaultIpamIpamScope = new AliCloud.Vpc.IpamIpamScope("default", new()
{
IpamScopeName = name,
IpamId = defaultIpam.Id,
IpamScopeDescription = "This is a ipam scope.",
IpamScopeType = "private",
Tags =
{
{ "k1", "v1" },
},
});
var defaultGetIpamIpamScopes = AliCloud.Vpc.GetIpamIpamScopes.Invoke(new()
{
IpamScopeName = defaultIpamIpamScope.IpamScopeName,
});
return new Dictionary<string, object?>
{
["alicloudVpcIpamIpamScopeExampleId"] = defaultGetIpamIpamScopes.Apply(getIpamIpamScopesResult => getIpamIpamScopesResult.Scopes[0]?.Id),
};
});
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.GetResourceGroupsArgs;
import com.pulumi.alicloud.vpc.IpamIpam;
import com.pulumi.alicloud.vpc.IpamIpamArgs;
import com.pulumi.alicloud.vpc.IpamIpamScope;
import com.pulumi.alicloud.vpc.IpamIpamScopeArgs;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetIpamIpamScopesArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.build());
var defaultIpam = new IpamIpam("defaultIpam", IpamIpamArgs.builder()
.operatingRegionLists("cn-hangzhou")
.ipamName(name)
.build());
var defaultIpamIpamScope = new IpamIpamScope("defaultIpamIpamScope", IpamIpamScopeArgs.builder()
.ipamScopeName(name)
.ipamId(defaultIpam.id())
.ipamScopeDescription("This is a ipam scope.")
.ipamScopeType("private")
.tags(Map.of("k1", "v1"))
.build());
final var defaultGetIpamIpamScopes = defaultIpamIpamScope.ipamScopeName().applyValue(_ipamScopeName -> VpcFunctions.getIpamIpamScopes(GetIpamIpamScopesArgs.builder()
.ipamScopeName(_ipamScopeName)
.build()));
ctx.export("alicloudVpcIpamIpamScopeExampleId", defaultGetIpamIpamScopes.applyValue(_defaultGetIpamIpamScopes -> _defaultGetIpamIpamScopes.scopes()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultIpam:
type: alicloud:vpc:IpamIpam
properties:
operatingRegionLists:
- cn-hangzhou
ipamName: ${name}
defaultIpamIpamScope:
type: alicloud:vpc:IpamIpamScope
name: default
properties:
ipamScopeName: ${name}
ipamId: ${defaultIpam.id}
ipamScopeDescription: This is a ipam scope.
ipamScopeType: private
tags:
k1: v1
variables:
default:
fn::invoke:
function: alicloud:resourcemanager:getResourceGroups
arguments: {}
defaultGetIpamIpamScopes:
fn::invoke:
function: alicloud:vpc:getIpamIpamScopes
arguments:
ipamScopeName: ${defaultIpamIpamScope.ipamScopeName}
outputs:
alicloudVpcIpamIpamScopeExampleId: ${defaultGetIpamIpamScopes.scopes[0].id}
Using getIpamIpamScopes
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 getIpamIpamScopes(args: GetIpamIpamScopesArgs, opts?: InvokeOptions): Promise<GetIpamIpamScopesResult>
function getIpamIpamScopesOutput(args: GetIpamIpamScopesOutputArgs, opts?: InvokeOptions): Output<GetIpamIpamScopesResult>def get_ipam_ipam_scopes(ids: Optional[Sequence[str]] = None,
ipam_id: Optional[str] = None,
ipam_scope_id: Optional[str] = None,
ipam_scope_name: Optional[str] = None,
ipam_scope_type: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetIpamIpamScopesResult
def get_ipam_ipam_scopes_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
ipam_id: Optional[pulumi.Input[str]] = None,
ipam_scope_id: Optional[pulumi.Input[str]] = None,
ipam_scope_name: Optional[pulumi.Input[str]] = None,
ipam_scope_type: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIpamIpamScopesResult]func GetIpamIpamScopes(ctx *Context, args *GetIpamIpamScopesArgs, opts ...InvokeOption) (*GetIpamIpamScopesResult, error)
func GetIpamIpamScopesOutput(ctx *Context, args *GetIpamIpamScopesOutputArgs, opts ...InvokeOption) GetIpamIpamScopesResultOutput> Note: This function is named GetIpamIpamScopes in the Go SDK.
public static class GetIpamIpamScopes
{
public static Task<GetIpamIpamScopesResult> InvokeAsync(GetIpamIpamScopesArgs args, InvokeOptions? opts = null)
public static Output<GetIpamIpamScopesResult> Invoke(GetIpamIpamScopesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetIpamIpamScopesResult> getIpamIpamScopes(GetIpamIpamScopesArgs args, InvokeOptions options)
public static Output<GetIpamIpamScopesResult> getIpamIpamScopes(GetIpamIpamScopesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:vpc/getIpamIpamScopes:getIpamIpamScopes
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A list of Ipam Scope IDs.
- Ipam
Id string - The id of the Ipam instance.
- Ipam
Scope stringId - The first ID of the resource.
- Ipam
Scope stringName - The name of the resource.
- Ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Resource
Group stringId - The ID of the resource group.
- Dictionary<string, string>
- The tag of the resource.
- Ids []string
- A list of Ipam Scope IDs.
- Ipam
Id string - The id of the Ipam instance.
- Ipam
Scope stringId - The first ID of the resource.
- Ipam
Scope stringName - The name of the resource.
- Ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- Name
Regex string - A regex string to filter results by Group Metric Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Resource
Group stringId - The ID of the resource group.
- map[string]string
- The tag of the resource.
- ids List<String>
- A list of Ipam Scope IDs.
- ipam
Id String - The id of the Ipam instance.
- ipam
Scope StringId - The first ID of the resource.
- ipam
Scope StringName - The name of the resource.
- ipam
Scope StringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview). - resource
Group StringId - The ID of the resource group.
- Map<String,String>
- The tag of the resource.
- ids string[]
- A list of Ipam Scope IDs.
- ipam
Id string - The id of the Ipam instance.
- ipam
Scope stringId - The first ID of the resource.
- ipam
Scope stringName - The name of the resource.
- ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name
Regex string - A regex string to filter results by Group Metric Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview). - resource
Group stringId - The ID of the resource group.
- {[key: string]: string}
- The tag of the resource.
- ids Sequence[str]
- A list of Ipam Scope IDs.
- ipam_
id str - The id of the Ipam instance.
- ipam_
scope_ strid - The first ID of the resource.
- ipam_
scope_ strname - The name of the resource.
- ipam_
scope_ strtype - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name_
regex str - A regex string to filter results by Group Metric Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - resource_
group_ strid - The ID of the resource group.
- Mapping[str, str]
- The tag of the resource.
- ids List<String>
- A list of Ipam Scope IDs.
- ipam
Id String - The id of the Ipam instance.
- ipam
Scope StringId - The first ID of the resource.
- ipam
Scope StringName - The name of the resource.
- ipam
Scope StringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name
Regex String - A regex string to filter results by Group Metric Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview). - resource
Group StringId - The ID of the resource group.
- Map<String>
- The tag of the resource.
getIpamIpamScopes Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Ipam Scope IDs.
- Names List<string>
- A list of name of Ipam Scopes.
- Scopes
List<Pulumi.
Ali Cloud. Vpc. Outputs. Get Ipam Ipam Scopes Scope> - A list of Ipam Scope Entries. Each element contains the following attributes:
- Ipam
Id string - The id of the Ipam instance.
- Ipam
Scope stringId - The first ID of the resource.
- Ipam
Scope stringName - The name of the resource.
- Ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- Name
Regex string - Output
File string - Resource
Group stringId - The ID of the resource group.
- Dictionary<string, string>
- The tag of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Ipam Scope IDs.
- Names []string
- A list of name of Ipam Scopes.
- Scopes
[]Get
Ipam Ipam Scopes Scope - A list of Ipam Scope Entries. Each element contains the following attributes:
- Ipam
Id string - The id of the Ipam instance.
- Ipam
Scope stringId - The first ID of the resource.
- Ipam
Scope stringName - The name of the resource.
- Ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- Name
Regex string - Output
File string - Resource
Group stringId - The ID of the resource group.
- map[string]string
- The tag of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Ipam Scope IDs.
- names List<String>
- A list of name of Ipam Scopes.
- scopes
List<Get
Ipam Ipam Scopes Scope> - A list of Ipam Scope Entries. Each element contains the following attributes:
- ipam
Id String - The id of the Ipam instance.
- ipam
Scope StringId - The first ID of the resource.
- ipam
Scope StringName - The name of the resource.
- ipam
Scope StringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name
Regex String - output
File String - resource
Group StringId - The ID of the resource group.
- Map<String,String>
- The tag of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Ipam Scope IDs.
- names string[]
- A list of name of Ipam Scopes.
- scopes
Get
Ipam Ipam Scopes Scope[] - A list of Ipam Scope Entries. Each element contains the following attributes:
- ipam
Id string - The id of the Ipam instance.
- ipam
Scope stringId - The first ID of the resource.
- ipam
Scope stringName - The name of the resource.
- ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name
Regex string - output
File string - resource
Group stringId - The ID of the resource group.
- {[key: string]: string}
- The tag of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Ipam Scope IDs.
- names Sequence[str]
- A list of name of Ipam Scopes.
- scopes
Sequence[Get
Ipam Ipam Scopes Scope] - A list of Ipam Scope Entries. Each element contains the following attributes:
- ipam_
id str - The id of the Ipam instance.
- ipam_
scope_ strid - The first ID of the resource.
- ipam_
scope_ strname - The name of the resource.
- ipam_
scope_ strtype - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name_
regex str - output_
file str - resource_
group_ strid - The ID of the resource group.
- Mapping[str, str]
- The tag of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Ipam Scope IDs.
- names List<String>
- A list of name of Ipam Scopes.
- scopes List<Property Map>
- A list of Ipam Scope Entries. Each element contains the following attributes:
- ipam
Id String - The id of the Ipam instance.
- ipam
Scope StringId - The first ID of the resource.
- ipam
Scope StringName - The name of the resource.
- ipam
Scope StringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- name
Regex String - output
File String - resource
Group StringId - The ID of the resource group.
- Map<String>
- The tag of the resource.
Supporting Types
GetIpamIpamScopesScope
- Create
Time string - The creation time of the resource.
- Id string
- The ID of the resource supplied above.
- Ipam
Id string - The id of the Ipam instance.
- Ipam
Scope stringDescription - The description of the IPAM's scope of action.It must be 2 to 256 characters in length and must start with a lowercase letter, but cannot start with 'http:// 'or 'https. If it is not filled in, it is empty. The default value is empty.
- Ipam
Scope stringId - The first ID of the resource.
- Ipam
Scope stringName - The name of the resource.
- Ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- Region
Id string - The region ID of the resource.
- Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the resource.
- Dictionary<string, string>
- The tag of the resource.
- Create
Time string - The creation time of the resource.
- Id string
- The ID of the resource supplied above.
- Ipam
Id string - The id of the Ipam instance.
- Ipam
Scope stringDescription - The description of the IPAM's scope of action.It must be 2 to 256 characters in length and must start with a lowercase letter, but cannot start with 'http:// 'or 'https. If it is not filled in, it is empty. The default value is empty.
- Ipam
Scope stringId - The first ID of the resource.
- Ipam
Scope stringName - The name of the resource.
- Ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- Region
Id string - The region ID of the resource.
- Resource
Group stringId - The ID of the resource group.
- Status string
- The status of the resource.
- map[string]string
- The tag of the resource.
- create
Time String - The creation time of the resource.
- id String
- The ID of the resource supplied above.
- ipam
Id String - The id of the Ipam instance.
- ipam
Scope StringDescription - The description of the IPAM's scope of action.It must be 2 to 256 characters in length and must start with a lowercase letter, but cannot start with 'http:// 'or 'https. If it is not filled in, it is empty. The default value is empty.
- ipam
Scope StringId - The first ID of the resource.
- ipam
Scope StringName - The name of the resource.
- ipam
Scope StringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- region
Id String - The region ID of the resource.
- resource
Group StringId - The ID of the resource group.
- status String
- The status of the resource.
- Map<String,String>
- The tag of the resource.
- create
Time string - The creation time of the resource.
- id string
- The ID of the resource supplied above.
- ipam
Id string - The id of the Ipam instance.
- ipam
Scope stringDescription - The description of the IPAM's scope of action.It must be 2 to 256 characters in length and must start with a lowercase letter, but cannot start with 'http:// 'or 'https. If it is not filled in, it is empty. The default value is empty.
- ipam
Scope stringId - The first ID of the resource.
- ipam
Scope stringName - The name of the resource.
- ipam
Scope stringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- region
Id string - The region ID of the resource.
- resource
Group stringId - The ID of the resource group.
- status string
- The status of the resource.
- {[key: string]: string}
- The tag of the resource.
- create_
time str - The creation time of the resource.
- id str
- The ID of the resource supplied above.
- ipam_
id str - The id of the Ipam instance.
- ipam_
scope_ strdescription - The description of the IPAM's scope of action.It must be 2 to 256 characters in length and must start with a lowercase letter, but cannot start with 'http:// 'or 'https. If it is not filled in, it is empty. The default value is empty.
- ipam_
scope_ strid - The first ID of the resource.
- ipam_
scope_ strname - The name of the resource.
- ipam_
scope_ strtype - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- region_
id str - The region ID of the resource.
- resource_
group_ strid - The ID of the resource group.
- status str
- The status of the resource.
- Mapping[str, str]
- The tag of the resource.
- create
Time String - The creation time of the resource.
- id String
- The ID of the resource supplied above.
- ipam
Id String - The id of the Ipam instance.
- ipam
Scope StringDescription - The description of the IPAM's scope of action.It must be 2 to 256 characters in length and must start with a lowercase letter, but cannot start with 'http:// 'or 'https. If it is not filled in, it is empty. The default value is empty.
- ipam
Scope StringId - The first ID of the resource.
- ipam
Scope StringName - The name of the resource.
- ipam
Scope StringType - IPAM scope of action type:private.> Currently, only the role scope of the private network is supported.
- region
Id String - The region ID of the resource.
- resource
Group StringId - The ID of the resource group.
- status String
- The status of the resource.
- Map<String>
- The tag of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
