Class: Azure::ApiManagement::Mgmt::V2016_10_10::Models::SubscriptionCreateParameters

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb

Overview

Parameters supplied to the Create subscription operation.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameString

Returns Subscription name.

Returns:

  • (String)

    Subscription name.



24
25
26
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 24

def name
  @name
end

#primary_keyString

request key will be generated automatically.

Returns:

  • (String)

    Primary subscription key. If not specified during



28
29
30
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 28

def primary_key
  @primary_key
end

#product_idString

being created in form /products/productId

Returns:

  • (String)

    Product (product id path) for which subscription is



21
22
23
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 21

def product_id
  @product_id
end

#secondary_keyString

request key will be generated automatically.

Returns:

  • (String)

    Secondary subscription key. If not specified during



32
33
34
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 32

def secondary_key
  @secondary_key
end

#stateSubscriptionStateContract

value is specified, subscription is created with Submitted 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. Possible values include: ‘Suspended’, ‘Active’, ‘Expired’, ‘Submitted’, ‘Rejected’, ‘Cancelled’

Returns:



45
46
47
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 45

def state
  @state
end

#user_idString

created in form /users/uid

Returns:

  • (String)

    User (user id path) for whom subscription is being



17
18
19
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 17

def user_id
  @user_id
end

Class Method Details

.mapperObject

Mapper for SubscriptionCreateParameters class as Ruby Hash. This will be used for serialization/deserialization.



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/2016-10-10/generated/azure_mgmt_api_management/models/subscription_create_parameters.rb', line 52

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'SubscriptionCreateParameters',
    type: {
      name: 'Composite',
      class_name: 'SubscriptionCreateParameters',
      model_properties: {
        user_id: {
          client_side_validation: true,
          required: true,
          serialized_name: 'userId',
          type: {
            name: 'String'
          }
        },
        product_id: {
          client_side_validation: true,
          required: true,
          serialized_name: 'productId',
          type: {
            name: 'String'
          }
        },
        name: {
          client_side_validation: true,
          required: true,
          serialized_name: 'name',
          constraints: {
            MaxLength: 100,
            MinLength: 1
          },
          type: {
            name: 'String'
          }
        },
        primary_key: {
          client_side_validation: true,
          required: false,
          serialized_name: 'primaryKey',
          constraints: {
            MaxLength: 256,
            MinLength: 1
          },
          type: {
            name: 'String'
          }
        },
        secondary_key: {
          client_side_validation: true,
          required: false,
          serialized_name: 'secondaryKey',
          constraints: {
            MaxLength: 256,
            MinLength: 1
          },
          type: {
            name: 'String'
          }
        },
        state: {
          client_side_validation: true,
          required: false,
          serialized_name: 'state',
          type: {
            name: 'Enum',
            module: 'SubscriptionStateContract'
          }
        }
      }
    }
  }
end