Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Ddoscoo Ports of the current Alibaba Cloud user.
NOTE: Available since v1.123.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.ddos.getDdosCooPorts({
instanceId: "ddoscoo-cn-6ja1rl4j****",
ids: ["ddoscoo-cn-6ja1rl4j****:7001:tcp"],
});
export const firstDdoscooPortId = example.then(example => example.ports?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ddos.get_ddos_coo_ports(instance_id="ddoscoo-cn-6ja1rl4j****",
ids=["ddoscoo-cn-6ja1rl4j****:7001:tcp"])
pulumi.export("firstDdoscooPortId", example.ports[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 {
example, err := ddos.GetDdosCooPorts(ctx, &ddos.GetDdosCooPortsArgs{
InstanceId: "ddoscoo-cn-6ja1rl4j****",
Ids: []string{
"ddoscoo-cn-6ja1rl4j****:7001:tcp",
},
}, nil)
if err != nil {
return err
}
ctx.Export("firstDdoscooPortId", example.Ports[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Ddos.GetDdosCooPorts.Invoke(new()
{
InstanceId = "ddoscoo-cn-6ja1rl4j****",
Ids = new[]
{
"ddoscoo-cn-6ja1rl4j****:7001:tcp",
},
});
return new Dictionary<string, object?>
{
["firstDdoscooPortId"] = example.Apply(getDdosCooPortsResult => getDdosCooPortsResult.Ports[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.GetDdosCooPortsArgs;
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 = DdosFunctions.getDdosCooPorts(GetDdosCooPortsArgs.builder()
.instanceId("ddoscoo-cn-6ja1rl4j****")
.ids("ddoscoo-cn-6ja1rl4j****:7001:tcp")
.build());
ctx.export("firstDdoscooPortId", example.ports()[0].id());
}
}
variables:
example:
fn::invoke:
function: alicloud:ddos:getDdosCooPorts
arguments:
instanceId: ddoscoo-cn-6ja1rl4j****
ids:
- ddoscoo-cn-6ja1rl4j****:7001:tcp
outputs:
firstDdoscooPortId: ${example.ports[0].id}
Using getDdosCooPorts
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 getDdosCooPorts(args: GetDdosCooPortsArgs, opts?: InvokeOptions): Promise<GetDdosCooPortsResult>
function getDdosCooPortsOutput(args: GetDdosCooPortsOutputArgs, opts?: InvokeOptions): Output<GetDdosCooPortsResult>def get_ddos_coo_ports(frontend_port: Optional[str] = None,
frontend_protocol: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDdosCooPortsResult
def get_ddos_coo_ports_output(frontend_port: Optional[pulumi.Input[str]] = None,
frontend_protocol: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDdosCooPortsResult]func GetDdosCooPorts(ctx *Context, args *GetDdosCooPortsArgs, opts ...InvokeOption) (*GetDdosCooPortsResult, error)
func GetDdosCooPortsOutput(ctx *Context, args *GetDdosCooPortsOutputArgs, opts ...InvokeOption) GetDdosCooPortsResultOutput> Note: This function is named GetDdosCooPorts in the Go SDK.
public static class GetDdosCooPorts
{
public static Task<GetDdosCooPortsResult> InvokeAsync(GetDdosCooPortsArgs args, InvokeOptions? opts = null)
public static Output<GetDdosCooPortsResult> Invoke(GetDdosCooPortsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDdosCooPortsResult> getDdosCooPorts(GetDdosCooPortsArgs args, InvokeOptions options)
public static Output<GetDdosCooPortsResult> getDdosCooPorts(GetDdosCooPortsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:ddos/getDdosCooPorts:getDdosCooPorts
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - The DdosCoo instance ID.
- Frontend
Port string - The forwarding port.
- Frontend
Protocol string - The forwarding protocol. Valid values
tcpandudp. - Ids List<string>
- A list of Port IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- Instance
Id string - The DdosCoo instance ID.
- Frontend
Port string - The forwarding port.
- Frontend
Protocol string - The forwarding protocol. Valid values
tcpandudp. - Ids []string
- A list of Port IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview).
- instance
Id String - The DdosCoo instance ID.
- frontend
Port String - The forwarding port.
- frontend
Protocol String - The forwarding protocol. Valid values
tcpandudp. - ids List<String>
- A list of Port IDs.
- output
File String - File name where to save data source results (after running
pulumi preview).
- instance
Id string - The DdosCoo instance ID.
- frontend
Port string - The forwarding port.
- frontend
Protocol string - The forwarding protocol. Valid values
tcpandudp. - ids string[]
- A list of Port IDs.
- output
File string - File name where to save data source results (after running
pulumi preview).
- instance_
id str - The DdosCoo instance ID.
- frontend_
port str - The forwarding port.
- frontend_
protocol str - The forwarding protocol. Valid values
tcpandudp. - ids Sequence[str]
- A list of Port IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview).
- instance
Id String - The DdosCoo instance ID.
- frontend
Port String - The forwarding port.
- frontend
Protocol String - The forwarding protocol. Valid values
tcpandudp. - ids List<String>
- A list of Port IDs.
- output
File String - File name where to save data source results (after running
pulumi preview).
getDdosCooPorts Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instance
Id string - The Ddoscoo instance ID.
- Ports
List<Pulumi.
Ali Cloud. Ddos. Outputs. Get Ddos Coo Ports Port> - A list of DdosCoo Ports. Each element contains the following attributes:
- Frontend
Port string - The forwarding port.
- Frontend
Protocol string - The forwarding protocol.
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - The Ddoscoo instance ID.
- Ports
[]Get
Ddos Coo Ports Port - A list of DdosCoo Ports. Each element contains the following attributes:
- Frontend
Port string - The forwarding port.
- Frontend
Protocol string - The forwarding protocol.
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - The Ddoscoo instance ID.
- ports
List<Get
Ddos Coo Ports Port> - A list of DdosCoo Ports. Each element contains the following attributes:
- frontend
Port String - The forwarding port.
- frontend
Protocol String - The forwarding protocol.
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - The Ddoscoo instance ID.
- ports
Get
Ddos Coo Ports Port[] - A list of DdosCoo Ports. Each element contains the following attributes:
- frontend
Port string - The forwarding port.
- frontend
Protocol string - The forwarding protocol.
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instance_
id str - The Ddoscoo instance ID.
- ports
Sequence[Get
Ddos Coo Ports Port] - A list of DdosCoo Ports. Each element contains the following attributes:
- frontend_
port str - The forwarding port.
- frontend_
protocol str - The forwarding protocol.
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - The Ddoscoo instance ID.
- ports List<Property Map>
- A list of DdosCoo Ports. Each element contains the following attributes:
- frontend
Port String - The forwarding port.
- frontend
Protocol String - The forwarding protocol.
- output
File String
Supporting Types
GetDdosCooPortsPort
- Backend
Port string - The source station port.
- Frontend
Port string - The forwarding port.
- Frontend
Protocol string - The forwarding protocol. Valid values
tcpandudp. - Id string
- The ID of the Port.
- Instance
Id string - The DdosCoo instance ID.
- Real
Servers List<string> - List of source IP addresses.
- Backend
Port string - The source station port.
- Frontend
Port string - The forwarding port.
- Frontend
Protocol string - The forwarding protocol. Valid values
tcpandudp. - Id string
- The ID of the Port.
- Instance
Id string - The DdosCoo instance ID.
- Real
Servers []string - List of source IP addresses.
- backend
Port String - The source station port.
- frontend
Port String - The forwarding port.
- frontend
Protocol String - The forwarding protocol. Valid values
tcpandudp. - id String
- The ID of the Port.
- instance
Id String - The DdosCoo instance ID.
- real
Servers List<String> - List of source IP addresses.
- backend
Port string - The source station port.
- frontend
Port string - The forwarding port.
- frontend
Protocol string - The forwarding protocol. Valid values
tcpandudp. - id string
- The ID of the Port.
- instance
Id string - The DdosCoo instance ID.
- real
Servers string[] - List of source IP addresses.
- backend_
port str - The source station port.
- frontend_
port str - The forwarding port.
- frontend_
protocol str - The forwarding protocol. Valid values
tcpandudp. - id str
- The ID of the Port.
- instance_
id str - The DdosCoo instance ID.
- real_
servers Sequence[str] - List of source IP addresses.
- backend
Port String - The source station port.
- frontend
Port String - The forwarding port.
- frontend
Protocol String - The forwarding protocol. Valid values
tcpandudp. - id String
- The ID of the Port.
- instance
Id String - The DdosCoo instance ID.
- real
Servers List<String> - List of source IP addresses.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
