Skip to main content
本产品推出了新版本。
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

Create a new subscription

贡献者

POST /accounts/{account_id}/core/v1/subscriptions

Indicates desired values for the Subscription API resource to be created.

Parameters

Name Type In Required Description

account_id

string

path

True

ID of the containing account resource

  • example: {{.Account}}

Request Body

Indicates desired values for the Subscription API resource to be created.

Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-subscription"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

  • "1.2"

customerProfileID

string

False

JSON string containing the customer profile ID from Authorize.net, which was invoked by the UI, is not set for the trial term. Returns an empty string during read operation, if not set. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

paymentFirstName

string

False

JSON string containing a user-specified long-form first name used for payment billing. Specified only when the subscription is being rebilled. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

paymentLastName

string

False

JSON string containing a user-specified long-form last name used for payment billing. Specified only when the subscription is being rebilled. Defined values are:

  • Minimum length: 1

  • Maximum length: 63

paymentAddress

paymentAddress

False

JSON object containing a collection of JSON strings specifying a billing address. Specified only when the subscription is being rebilled. If this key exists, all six of the contained JSON strings will be present. If nothing was provided by the user, the string will be empty.

paymentProfileID

string

False

JSON string containing the payment profile ID from Authorize.net that was invoked by the UI, not set for trial term. Returns an empty string during read operation if not set. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

paymentExpiry

string

False

JSON string containing a timestamp indicating when the payment method expires. This is obtained from authorize.net](http://authorize.net) and is set by the UI. Defined values are:

  • Conforms to the ISO-8601 Date Time Schema This field is not returned for trial terms.

marketplace

string

False

JSON string indicating the marketplace for an account where payments will be recorded. Defined values:

  • "netapp"

  • "azure"

  • "aws"

  • "gcp"

terms

string

True

JSON string indicating the current tier of the account. Defined values are:

  • "trial"

  • "paid"

metadata

type_astra_metadata_update

False

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example request
{
  "type": "application/astra-subscription",
  "version": "1.2",
  "terms": "trial"
}

Response

Status: 201, Returns the newly created subscription resource in the JSON response body.
Name Type Required Description

type

string

True

Media type of the resource. Defined values are:

  • "application/astra-subscription"

version

string

True

Version of the resource. Defined values are:

  • "1.0"

  • "1.1"

  • "1.2"

id

string

True

Globally unique identifier of the resource. Defined values are:

  • Conforms to the UUIDv4 Schema

customerProfileID

string

True

JSON string containing the customer profile ID from Authorize.net, which was invoked by the UI, is not set for the trial term. Returns an empty string during read operation, if not set. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

paymentProfileID

string

False

JSON string containing the payment profile ID from Authorize.net that was invoked by the UI, not set for trial term. Returns an empty string during read operation if not set. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

paymentExpiry

string

False

JSON string containing a timestamp indicating when the payment method expires. This is obtained from authorize.net](http://authorize.net) and is set by the UI. Defined values are:

  • Conforms to the ISO-8601 Date Time Schema This field is not returned for trial terms.

purchaseOrderNumber

string

False

JSON string containing the purchase order number for the payment method. Defined values are:

  • Minimum length: 1

  • Maximum length: 31

marketplace

string

False

JSON string indicating the marketplace for an account where payments will be recorded. Defined values:

  • "netapp"

  • "azure"

  • "aws"

  • "gcp"

licenseSN

string

False

JSON string containing the license serial number for the payment method. Defined values are:

  • Minimum length: 1

  • Maximum length: 31

terms

string

True

JSON string indicating the current tier of the account. Defined values are:

  • "trial"

  • "paid"

status

string

True

JSON string indicating the current status of the subscription. Defined values are:

  • "active"

  • "inactive"

appLimit

number

True

JSON number indicating the application limit for this subscription. Value of -1 indicates no limit.

namespaceLimit

number

True

JSON number indicating the namespace limit for this subscription. Value of -1 indicates no limit.

subscriptionPeriod

number

True

JSON number indicating the subscription period. Value of -1 indicates no limit. Unit: days

gracePeriod

number

True

JSON number indicating the grace period after the trial subscription has expired or a paid subscription is canceled. Unit: days

reminderBeforePeriod

number

True

JSON number indicating the number of days before the end of the trial subscription when the customer notifications will begin. The value is expressed in days with a value of -1 indicating it's not applicable.

onboardStatus

string

True

JSON string indicating the current status of customer onboarding. Valid values are "not started", "in progress", "success", "failed". Defined values are:

  • "not started"

  • "in progress"

  • "success"

  • "failed"

costPerAppUnit

number

True

JSON number indicating the cost per app unit. For a trial version, the value is 0. Unit: US dollars

costPerNamespaceUnit

number

True

JSON number indicating the cost per namespace unit. For a trial version, the value is 0. Unit: US dollars

metadata

type_astra_metadata_update

True

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Example response
{
  "type": "application/astra-subscription",
  "version": "1.2",
  "id": "40b4106f-b743-5d83-95c7-d539b2b45f63",
  "customerProfileID": "2157047189",
  "paymentProfileID": "E7CEB0A9F1BECA32A02493E1B31D5955",
  "paymentExpiry": "2022-02-01T00:00:00Z",
  "purchaseOrderNumber": "72384632",
  "marketplace": "netapp",
  "licenseSN": "278343",
  "terms": "trial",
  "status": "active",
  "appLimit": 0,
  "namespaceLimit": 10,
  "subscriptionPeriod": 90,
  "gracePeriod": 7,
  "reminderBeforePeriod": 30,
  "onboardStatus": "in progress",
  "costPerAppUnit": 0,
  "costPerNamespaceUnit": 0.005,
  "metadata": {
    "labels": [],
    "creationTimestamp": "2022-10-06T20:58:16.305662Z",
    "modificationTimestamp": "2022-10-06T20:58:16.305662Z",
    "createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
  }
}

Response

Status: 401, Unauthorized
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/3",
  "title": "Missing bearer token",
  "detail": "The request is missing the required bearer token.",
  "status": "401"
}

Response

Status: 400, Bad request
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

Response

Status: 409, Conflict
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

invalidFields

array[invalidFields]

False

List of invalid request body fields

Example response
{
  "type": "https://astra.netapp.io/problems/10",
  "title": "JSON resource conflict",
  "detail": "The request body JSON contains a field that conflicts with an idempotent value.",
  "status": "409"
}

Response

Status: 403, Forbidden
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example response
{
  "type": "https://astra.netapp.io/problems/11",
  "title": "Operation not permitted",
  "detail": "The requested operation isn't permitted.",
  "status": "403"
}

Error

Status: 404, Not found
Name Type Required Description

type

string

True

title

string

True

detail

string

True

status

string

True

correlationID

string

False

Example error response
{
  "type": "https://astra.netapp.io/problems/2",
  "title": "Collection not found",
  "detail": "The collection specified in the request URI wasn't found.",
  "status": "404"
}

Definitions

See Definitions

paymentAddress

JSON object containing a collection of JSON strings specifying a billing address. Specified only when the subscription is being rebilled. If this key exists, all six of the contained JSON strings will be present. If nothing was provided by the user, the string will be empty.

Name Type Required Description

addressCountry

string

True

JSON string containing the country name or country code associated with the postal address, as specified in ISO 3166 Alpha-2. Defined values are:

  • Minimum length: 0

  • Maximum length: 2

addressLocality

string

True

JSON string containing the locality (for example, city) associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

addressRegion

string

True

JSON string containing the region (for example, state) associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

postalCode

string

True

JSON string containing the postal code associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

streetAddress1

string

True

JSON string containing the street address associated with the postal address. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

streetAddress2

string

False

JSON string containing optional ancillary street address information, post office box, and more. Defined values are:

  • Minimum length: 0

  • Maximum length: 63

type_astra_label

Name Type Required Description

name

string

True

value

string

True

type_astra_metadata_update

Client and service-specified metadata associated with the resource. Defined values are:

  • Conforms to the Astra Metadata Schema If not specified on create, a metadata object will be created with no labels. If not specified on update, the metadata object's labels, creationTimestamp and createdBy, will be preserved without modification.

Name Type Required Description

labels

array[type_astra_label]

False

creationTimestamp

string

False

modificationTimestamp

string

False

createdBy

string

False

modifiedBy

string

False

invalidParams

Name Type Required Description

name

string

True

Name of the invalid query parameter

reason

string

True

Reason why the query parameter is invalid

invalidFields

Name Type Required Description

name

string

True

Name of the invalid request body field

reason

string

True

Reason why the request body field is invalid