opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud
opentelekomcloud.getApigwApiHistoryV2
Explore with Pulumi AI
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud
Up-to-date reference of API arguments for APIGW API history you can get at documentation portal
This API is used to query the historical versions of an API within OpenTelekomCloud. APIGW retains a maximum of 10 historical versions for each API in an environment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const config = new pulumi.Config();
const gatewayId = config.requireObject("gatewayId");
const environmentId = config.requireObject("environmentId");
const apiId = config.requireObject("apiId");
const pub = new opentelekomcloud.ApigwApiPublishmentV2("pub", {
gatewayId: _var.instance_id,
environmentId: environmentId,
apiId: apiId,
});
const hist = opentelekomcloud.getApigwApiHistoryV2({
gatewayId: opentelekomcloud_apigw_gateway_v2.gateway.id,
environmentId: opentelekomcloud_apigw_environment_v2.env.id,
apiId: opentelekomcloud_apigw_api_v2.api.id,
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
config = pulumi.Config()
gateway_id = config.require_object("gatewayId")
environment_id = config.require_object("environmentId")
api_id = config.require_object("apiId")
pub = opentelekomcloud.ApigwApiPublishmentV2("pub",
gateway_id=var["instance_id"],
environment_id=environment_id,
api_id=api_id)
hist = opentelekomcloud.get_apigw_api_history_v2(gateway_id=opentelekomcloud_apigw_gateway_v2["gateway"]["id"],
environment_id=opentelekomcloud_apigw_environment_v2["env"]["id"],
api_id=opentelekomcloud_apigw_api_v2["api"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
"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, "")
gatewayId := cfg.RequireObject("gatewayId")
environmentId := cfg.RequireObject("environmentId")
apiId := cfg.RequireObject("apiId")
_, err := opentelekomcloud.NewApigwApiPublishmentV2(ctx, "pub", &opentelekomcloud.ApigwApiPublishmentV2Args{
GatewayId: pulumi.Any(_var.Instance_id),
EnvironmentId: pulumi.Any(environmentId),
ApiId: pulumi.Any(apiId),
})
if err != nil {
return err
}
_, err = opentelekomcloud.GetApigwApiHistoryV2(ctx, &opentelekomcloud.GetApigwApiHistoryV2Args{
GatewayId: opentelekomcloud_apigw_gateway_v2.Gateway.Id,
EnvironmentId: pulumi.StringRef(opentelekomcloud_apigw_environment_v2.Env.Id),
ApiId: opentelekomcloud_apigw_api_v2.Api.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var gatewayId = config.RequireObject<dynamic>("gatewayId");
var environmentId = config.RequireObject<dynamic>("environmentId");
var apiId = config.RequireObject<dynamic>("apiId");
var pub = new Opentelekomcloud.ApigwApiPublishmentV2("pub", new()
{
GatewayId = @var.Instance_id,
EnvironmentId = environmentId,
ApiId = apiId,
});
var hist = Opentelekomcloud.GetApigwApiHistoryV2.Invoke(new()
{
GatewayId = opentelekomcloud_apigw_gateway_v2.Gateway.Id,
EnvironmentId = opentelekomcloud_apigw_environment_v2.Env.Id,
ApiId = opentelekomcloud_apigw_api_v2.Api.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.ApigwApiPublishmentV2;
import com.pulumi.opentelekomcloud.ApigwApiPublishmentV2Args;
import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
import com.pulumi.opentelekomcloud.inputs.GetApigwApiHistoryV2Args;
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 gatewayId = config.get("gatewayId");
final var environmentId = config.get("environmentId");
final var apiId = config.get("apiId");
var pub = new ApigwApiPublishmentV2("pub", ApigwApiPublishmentV2Args.builder()
.gatewayId(var_.instance_id())
.environmentId(environmentId)
.apiId(apiId)
.build());
final var hist = OpentelekomcloudFunctions.getApigwApiHistoryV2(GetApigwApiHistoryV2Args.builder()
.gatewayId(opentelekomcloud_apigw_gateway_v2.gateway().id())
.environmentId(opentelekomcloud_apigw_environment_v2.env().id())
.apiId(opentelekomcloud_apigw_api_v2.api().id())
.build());
}
}
configuration:
gatewayId:
type: dynamic
environmentId:
type: dynamic
apiId:
type: dynamic
resources:
pub:
type: opentelekomcloud:ApigwApiPublishmentV2
properties:
gatewayId: ${var.instance_id}
environmentId: ${environmentId}
apiId: ${apiId}
variables:
hist:
fn::invoke:
function: opentelekomcloud:getApigwApiHistoryV2
arguments:
gatewayId: ${opentelekomcloud_apigw_gateway_v2.gateway.id}
environmentId: ${opentelekomcloud_apigw_environment_v2.env.id}
apiId: ${opentelekomcloud_apigw_api_v2.api.id}
Using getApigwApiHistoryV2
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 getApigwApiHistoryV2(args: GetApigwApiHistoryV2Args, opts?: InvokeOptions): Promise<GetApigwApiHistoryV2Result>
function getApigwApiHistoryV2Output(args: GetApigwApiHistoryV2OutputArgs, opts?: InvokeOptions): Output<GetApigwApiHistoryV2Result>
def get_apigw_api_history_v2(api_id: Optional[str] = None,
environment_id: Optional[str] = None,
environment_name: Optional[str] = None,
gateway_id: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApigwApiHistoryV2Result
def get_apigw_api_history_v2_output(api_id: Optional[pulumi.Input[str]] = None,
environment_id: Optional[pulumi.Input[str]] = None,
environment_name: Optional[pulumi.Input[str]] = None,
gateway_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApigwApiHistoryV2Result]
func GetApigwApiHistoryV2(ctx *Context, args *GetApigwApiHistoryV2Args, opts ...InvokeOption) (*GetApigwApiHistoryV2Result, error)
func GetApigwApiHistoryV2Output(ctx *Context, args *GetApigwApiHistoryV2OutputArgs, opts ...InvokeOption) GetApigwApiHistoryV2ResultOutput
> Note: This function is named GetApigwApiHistoryV2
in the Go SDK.
public static class GetApigwApiHistoryV2
{
public static Task<GetApigwApiHistoryV2Result> InvokeAsync(GetApigwApiHistoryV2Args args, InvokeOptions? opts = null)
public static Output<GetApigwApiHistoryV2Result> Invoke(GetApigwApiHistoryV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApigwApiHistoryV2Result> getApigwApiHistoryV2(GetApigwApiHistoryV2Args args, InvokeOptions options)
public static Output<GetApigwApiHistoryV2Result> getApigwApiHistoryV2(GetApigwApiHistoryV2Args args, InvokeOptions options)
fn::invoke:
function: opentelekomcloud:index/getApigwApiHistoryV2:getApigwApiHistoryV2
arguments:
# arguments dictionary
The following arguments are supported:
- Api
Id string - Specifies the ID of the API to be published or already published.
- Gateway
Id string - Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
- Environment
Id string - Specifies the environment ID.
- Environment
Name string - Specifies the environment name.
- Id string
- API version ID.
- Api
Id string - Specifies the ID of the API to be published or already published.
- Gateway
Id string - Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
- Environment
Id string - Specifies the environment ID.
- Environment
Name string - Specifies the environment name.
- Id string
- API version ID.
- api
Id String - Specifies the ID of the API to be published or already published.
- gateway
Id String - Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
- environment
Id String - Specifies the environment ID.
- environment
Name String - Specifies the environment name.
- id String
- API version ID.
- api
Id string - Specifies the ID of the API to be published or already published.
- gateway
Id string - Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
- environment
Id string - Specifies the environment ID.
- environment
Name string - Specifies the environment name.
- id string
- API version ID.
- api_
id str - Specifies the ID of the API to be published or already published.
- gateway_
id str - Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
- environment_
id str - Specifies the environment ID.
- environment_
name str - Specifies the environment name.
- id str
- API version ID.
- api
Id String - Specifies the ID of the API to be published or already published.
- gateway
Id String - Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
- environment
Id String - Specifies the environment ID.
- environment
Name String - Specifies the environment name.
- id String
- API version ID.
getApigwApiHistoryV2 Result
The following output properties are available:
- Api
Id string - Gateway
Id string - Histories
List<Get
Apigw Api History V2History> - List of APIGW history details. The object structure is documented below.
- Id string
- API version ID.
- Region string
- The region in which to APIs was published.
- Environment
Id string - Environment
Name string
- Api
Id string - Gateway
Id string - Histories
[]Get
Apigw Api History V2History - List of APIGW history details. The object structure is documented below.
- Id string
- API version ID.
- Region string
- The region in which to APIs was published.
- Environment
Id string - Environment
Name string
- api
Id String - gateway
Id String - histories
List<Get
Apigw Api History V2History> - List of APIGW history details. The object structure is documented below.
- id String
- API version ID.
- region String
- The region in which to APIs was published.
- environment
Id String - environment
Name String
- api
Id string - gateway
Id string - histories
Get
Apigw Api History V2History[] - List of APIGW history details. The object structure is documented below.
- id string
- API version ID.
- region string
- The region in which to APIs was published.
- environment
Id string - environment
Name string
- api_
id str - gateway_
id str - histories
Sequence[Get
Apigw Api History V2History] - List of APIGW history details. The object structure is documented below.
- id str
- API version ID.
- region str
- The region in which to APIs was published.
- environment_
id str - environment_
name str
- api
Id String - gateway
Id String - histories List<Property Map>
- List of APIGW history details. The object structure is documented below.
- id String
- API version ID.
- region String
- The region in which to APIs was published.
- environment
Id String - environment
Name String
Supporting Types
GetApigwApiHistoryV2History
- Description string
- The description about the API publication.
- Id string
- API version ID.
- Name string
- API version name.
- Publish
Time string - Time when the APIGW publication was created, in RFC-3339 format.
- Status double
- Version status.
Values:
1
:effective
2
:not effective
- Description string
- The description about the API publication.
- Id string
- API version ID.
- Name string
- API version name.
- Publish
Time string - Time when the APIGW publication was created, in RFC-3339 format.
- Status float64
- Version status.
Values:
1
:effective
2
:not effective
- description String
- The description about the API publication.
- id String
- API version ID.
- name String
- API version name.
- publish
Time String - Time when the APIGW publication was created, in RFC-3339 format.
- status Double
- Version status.
Values:
1
:effective
2
:not effective
- description string
- The description about the API publication.
- id string
- API version ID.
- name string
- API version name.
- publish
Time string - Time when the APIGW publication was created, in RFC-3339 format.
- status number
- Version status.
Values:
1
:effective
2
:not effective
- description str
- The description about the API publication.
- id str
- API version ID.
- name str
- API version name.
- publish_
time str - Time when the APIGW publication was created, in RFC-3339 format.
- status float
- Version status.
Values:
1
:effective
2
:not effective
- description String
- The description about the API publication.
- id String
- API version ID.
- name String
- API version name.
- publish
Time String - Time when the APIGW publication was created, in RFC-3339 format.
- status Number
- Version status.
Values:
1
:effective
2
:not effective
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud