This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
getSubscription.go
62 lines (57 loc) · 4.11 KB
/
getSubscription.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20200601preview
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func LookupSubscription(ctx *pulumi.Context, args *LookupSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupSubscriptionResult, error) {
var rv LookupSubscriptionResult
err := ctx.Invoke("azure-nextgen:apimanagement/v20200601preview:getSubscription", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupSubscriptionArgs struct {
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the API Management service.
ServiceName string `pulumi:"serviceName"`
// Subscription entity Identifier. The entity represents the association between a user and a product in API Management.
Sid string `pulumi:"sid"`
}
// Subscription details.
type LookupSubscriptionResult struct {
// Determines whether tracing is enabled
AllowTracing *bool `pulumi:"allowTracing"`
// Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
CreatedDate string `pulumi:"createdDate"`
// The name of the subscription, or null if the subscription has no name.
DisplayName *string `pulumi:"displayName"`
// Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
EndDate *string `pulumi:"endDate"`
// Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
ExpirationDate *string `pulumi:"expirationDate"`
// Resource ID.
Id string `pulumi:"id"`
// Resource name.
Name string `pulumi:"name"`
// Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
NotificationDate *string `pulumi:"notificationDate"`
// The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.
OwnerId *string `pulumi:"ownerId"`
// Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
PrimaryKey *string `pulumi:"primaryKey"`
// Scope like /products/{productId} or /apis or /apis/{apiId}.
Scope string `pulumi:"scope"`
// Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
SecondaryKey *string `pulumi:"secondaryKey"`
// Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
StartDate *string `pulumi:"startDate"`
// Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.
State string `pulumi:"state"`
// Optional subscription comment added by an administrator when the state is changed to the 'rejected'.
StateComment *string `pulumi:"stateComment"`
// Resource type for API Management resource.
Type string `pulumi:"type"`
}