Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.ddos.getDdosCooPorts
Explore with Pulumi AI
This data source provides the Ddoscoo Ports of the current Alibaba Cloud user.
NOTE: Available in 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.applyValue(getDdosCooPortsResult -> getDdosCooPortsResult.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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ddos/getDdosCooPorts:getDdosCooPorts
arguments:
# arguments dictionary
The 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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 - Ports
List<Pulumi.
Ali Cloud. Ddos. Outputs. Get Ddos Coo Ports Port> - Frontend
Port string - Frontend
Protocol string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - Ports
[]Get
Ddos Coo Ports Port - Frontend
Port string - Frontend
Protocol string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - ports
List<Get
Ddos Coo Ports Port> - frontend
Port String - frontend
Protocol String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - ports
Get
Ddos Coo Ports Port[] - frontend
Port string - frontend
Protocol string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instance_
id str - ports
Sequence[Get
Ddos Coo Ports Port] - frontend_
port str - frontend_
protocol str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - ports List<Property Map>
- frontend
Port String - frontend
Protocol String - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
tcp
andudp
. - 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
alicloud
Terraform Provider.