Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.ddos.getDdosBgpIps
Explore with Pulumi AI
This data source provides the Ddos Bgp Ips of the current Alibaba Cloud user.
NOTE: Available in v1.180.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.ddos.getDdosBgpIps({
instanceId: "example_value",
ids: [
"example_value-1",
"example_value-2",
],
});
export const ddosbgpIpId1 = ids.then(ids => ids.ips?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.ddos.get_ddos_bgp_ips(instance_id="example_value",
ids=[
"example_value-1",
"example_value-2",
])
pulumi.export("ddosbgpIpId1", ids.ips[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ddos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := ddos.GetDdosBgpIps(ctx, &ddos.GetDdosBgpIpsArgs{
InstanceId: "example_value",
Ids: []string{
"example_value-1",
"example_value-2",
},
}, nil)
if err != nil {
return err
}
ctx.Export("ddosbgpIpId1", ids.Ips[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Ddos.GetDdosBgpIps.Invoke(new()
{
InstanceId = "example_value",
Ids = new[]
{
"example_value-1",
"example_value-2",
},
});
return new Dictionary<string, object?>
{
["ddosbgpIpId1"] = ids.Apply(getDdosBgpIpsResult => getDdosBgpIpsResult.Ips[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ddos.DdosFunctions;
import com.pulumi.alicloud.ddos.inputs.GetDdosBgpIpsArgs;
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 ids = DdosFunctions.getDdosBgpIps(GetDdosBgpIpsArgs.builder()
.instanceId("example_value")
.ids(
"example_value-1",
"example_value-2")
.build());
ctx.export("ddosbgpIpId1", ids.applyValue(getDdosBgpIpsResult -> getDdosBgpIpsResult.ips()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:ddos:getDdosBgpIps
Arguments:
instanceId: example_value
ids:
- example_value-1
- example_value-2
outputs:
ddosbgpIpId1: ${ids.ips[0].id}
Using getDdosBgpIps
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 getDdosBgpIps(args: GetDdosBgpIpsArgs, opts?: InvokeOptions): Promise<GetDdosBgpIpsResult>
function getDdosBgpIpsOutput(args: GetDdosBgpIpsOutputArgs, opts?: InvokeOptions): Output<GetDdosBgpIpsResult>
def get_ddos_bgp_ips(ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
product_name: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDdosBgpIpsResult
def get_ddos_bgp_ips_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
product_name: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDdosBgpIpsResult]
func GetDdosBgpIps(ctx *Context, args *GetDdosBgpIpsArgs, opts ...InvokeOption) (*GetDdosBgpIpsResult, error)
func GetDdosBgpIpsOutput(ctx *Context, args *GetDdosBgpIpsOutputArgs, opts ...InvokeOption) GetDdosBgpIpsResultOutput
> Note: This function is named GetDdosBgpIps
in the Go SDK.
public static class GetDdosBgpIps
{
public static Task<GetDdosBgpIpsResult> InvokeAsync(GetDdosBgpIpsArgs args, InvokeOptions? opts = null)
public static Output<GetDdosBgpIpsResult> Invoke(GetDdosBgpIpsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDdosBgpIpsResult> getDdosBgpIps(GetDdosBgpIpsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ddos/getDdosBgpIps:getDdosBgpIps
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The ID of the native protection enterprise instance to be operated.
- Ids List<string>
- A list of Ip IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Product
Name string - The product name. Valid Value:
ECS
,SLB
,EIP
,WAF
. - Status string
- The current state of the IP address. Valid Value:
- normal: indicates normal (not attacked).
- hole_begin: indicates that you are in a black hole state.
- Instance
Id string - The ID of the native protection enterprise instance to be operated.
- Ids []string
- A list of Ip IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Product
Name string - The product name. Valid Value:
ECS
,SLB
,EIP
,WAF
. - Status string
- The current state of the IP address. Valid Value:
- normal: indicates normal (not attacked).
- hole_begin: indicates that you are in a black hole state.
- instance
Id String - The ID of the native protection enterprise instance to be operated.
- ids List<String>
- A list of Ip IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer - product
Name String - The product name. Valid Value:
ECS
,SLB
,EIP
,WAF
. - status String
- The current state of the IP address. Valid Value:
- normal: indicates normal (not attacked).
- hole_begin: indicates that you are in a black hole state.
- instance
Id string - The ID of the native protection enterprise instance to be operated.
- ids string[]
- A list of Ip IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number - product
Name string - The product name. Valid Value:
ECS
,SLB
,EIP
,WAF
. - status string
- The current state of the IP address. Valid Value:
- normal: indicates normal (not attacked).
- hole_begin: indicates that you are in a black hole state.
- instance_
id str - The ID of the native protection enterprise instance to be operated.
- ids Sequence[str]
- A list of Ip IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
number int - page_
size int - product_
name str - The product name. Valid Value:
ECS
,SLB
,EIP
,WAF
. - status str
- The current state of the IP address. Valid Value:
- normal: indicates normal (not attacked).
- hole_begin: indicates that you are in a black hole state.
- instance
Id String - The ID of the native protection enterprise instance to be operated.
- ids List<String>
- A list of Ip IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number - product
Name String - The product name. Valid Value:
ECS
,SLB
,EIP
,WAF
. - status String
- The current state of the IP address. Valid Value:
- normal: indicates normal (not attacked).
- hole_begin: indicates that you are in a black hole state.
getDdosBgpIps Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instance
Id string - Ips
List<Pulumi.
Ali Cloud. Ddos. Outputs. Get Ddos Bgp Ips Ip> - Output
File string - Page
Number int - Page
Size int - Product
Name string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - Ips
[]Get
Ddos Bgp Ips Ip - Output
File string - Page
Number int - Page
Size int - Product
Name string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - ips
List<Get
Ddos Bgp Ips Ip> - output
File String - page
Number Integer - page
Size Integer - product
Name String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - ips
Get
Ddos Bgp Ips Ip[] - output
File string - page
Number number - page
Size number - product
Name string - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instance_
id str - ips
Sequence[Get
Ddos Bgp Ips Ip] - output_
file str - page_
number int - page_
size int - product_
name str - status str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - ips List<Property Map>
- output
File String - page
Number Number - page
Size Number - product
Name String - status String
Supporting Types
GetDdosBgpIpsIp
- Id string
- The ID of the Ip. The value formats as
<instance_id>:<ip>
. - Instance
Id string - The ID of the native protection enterprise instance to be operated.
- Ip string
- The IP address.
- Product string
- The type of cloud asset to which the IP address belongs.
- Status string
- The current state of the IP address.
- Id string
- The ID of the Ip. The value formats as
<instance_id>:<ip>
. - Instance
Id string - The ID of the native protection enterprise instance to be operated.
- Ip string
- The IP address.
- Product string
- The type of cloud asset to which the IP address belongs.
- Status string
- The current state of the IP address.
- id String
- The ID of the Ip. The value formats as
<instance_id>:<ip>
. - instance
Id String - The ID of the native protection enterprise instance to be operated.
- ip String
- The IP address.
- product String
- The type of cloud asset to which the IP address belongs.
- status String
- The current state of the IP address.
- id string
- The ID of the Ip. The value formats as
<instance_id>:<ip>
. - instance
Id string - The ID of the native protection enterprise instance to be operated.
- ip string
- The IP address.
- product string
- The type of cloud asset to which the IP address belongs.
- status string
- The current state of the IP address.
- id str
- The ID of the Ip. The value formats as
<instance_id>:<ip>
. - instance_
id str - The ID of the native protection enterprise instance to be operated.
- ip str
- The IP address.
- product str
- The type of cloud asset to which the IP address belongs.
- status str
- The current state of the IP address.
- id String
- The ID of the Ip. The value formats as
<instance_id>:<ip>
. - instance
Id String - The ID of the native protection enterprise instance to be operated.
- ip String
- The IP address.
- product String
- The type of cloud asset to which the IP address belongs.
- status String
- The current state of the IP address.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.