UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 20.2 kB
{"openapi":"3.0.0","info":{"description":"The Azure Instance Metadata Client","title":"InstanceMetadataClient","version":"2018-10-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2018-10-01/imds.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"imds","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/attested/document":{"get":{"description":"Get Attested Data for the Virtual Machine.","operationId":"Attested_GetDocument","parameters":[{"$ref":"#/components/parameters/ApiVersionParameter"},{"description":"This is a string of up to 32 random alphanumeric characters.","in":"query","name":"nonce","required":false,"schema":{"type":"string"},"examples":{"Get Attested Data for the VM":{"value":"abcde12345"}}},{"$ref":"#/components/parameters/MetadataParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestedData"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/identity/info":{"get":{"description":"Get information about AAD Metadata","operationId":"Identity_GetInfo","parameters":[{"$ref":"#/components/parameters/MetadataParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityInfoResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"}}}}},"tags":["Get metadata information"]}},"/identity/oauth2/token":{"get":{"description":"Get a Token from Azure AD","operationId":"Identity_GetToken","parameters":[{"$ref":"#/components/parameters/MetadataParameter"},{"description":"This is the urlencoded identifier URI of the sink resource for the requested Azure AD token. The resulting token contains the corresponding aud for this resource.","in":"query","name":"resource","required":true,"schema":{"type":"string"},"examples":{"Get Identity Token for the VM":{"value":"https://vault.azure.net"}}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"description":"This identifies, by Azure AD client id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with object_id and msi_res_id.","in":"query","name":"client_id","required":false,"schema":{"type":"string"}},{"description":"This identifies, by Azure AD object id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and msi_res_id.","in":"query","name":"object_id","required":false,"schema":{"type":"string"}},{"description":"This identifies, by urlencoded ARM resource id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and object_id.","in":"query","name":"msi_res_id","required":false,"schema":{"type":"string"}},{"description":"This indicates the authority to request AAD tokens from. Defaults to the known authority of the identity to be used.","in":"query","name":"authority","required":false,"schema":{"type":"string"}},{"description":"If provided, the value must be 'true'. This indicates to the server that the token must be retrieved from Azure AD and cannot be retrieved from an internal cache.","in":"query","name":"bypass_cache","required":false,"x-ms-enum":{"modelAsString":true,"name":"BypassCache"},"schema":{"type":"string","enum":["true"]}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityTokenResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"}}}}},"tags":["Get token"]}},"/instance":{"get":{"description":"Get Instance Metadata for the Virtual Machine.","operationId":"Instances_GetMetadata","parameters":[{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/MetadataParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instance"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"503":{"description":"Service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"servers":[{"url":"https://169.254.169.254/metadata"}],"components":{"examples":{"Get_Attested_Data_for_the_VM":{"value":{"error":"Service unavailable"}},"Get_Identity_Info_for_the_VM":{"value":{"error":"server_error","error_description":"Server error"}},"Get_Identity_Token_for_the_VM":{"value":{"error":"server_error","error_description":"Server error"}},"Get_Instance_Metadata_for_the_VM":{"value":{"error":"Service unavailable"}}},"parameters":{"ApiVersionParameter":{"description":"This is the API version to use.","in":"query","name":"api-version","required":true,"x-ms-enum":{"modelAsString":true,"name":"ApiVersion"},"schema":{"type":"string","enum":["2018-10-01"]},"examples":{"Get Attested Data for the VM":{"value":"2018-10-01"},"Get Identity Info for the VM":{"value":"2018-10-01"},"Get Identity Token for the VM":{"value":"2018-10-01"},"Get Instance Metadata for the VM":{"value":"2018-10-01"}}},"MetadataParameter":{"description":"This must be set to 'true'.","in":"header","name":"Metadata","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","enum":["true"]},"examples":{"Get Attested Data for the VM":{"value":"true"},"Get Identity Info for the VM":{"value":"true"},"Get Identity Token for the VM":{"value":"true"},"Get Instance Metadata for the VM":{"value":"true"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"AttestedData":{"description":"This is the response from the Attested_GetDocument operation.","properties":{"encoding":{"description":"This is the encoding scheme of the signature.","type":"string"},"signature":{"description":"This is the encoded string containing the VM ID, plan information, public key, timestamp, and nonce value.","type":"string"}},"type":"object"},"Compute":{"description":"Compute Metadata","properties":{"azEnvironment":{"description":"This is the name of the environment in which the VM is running.","type":"string"},"location":{"description":"This is the Azure Region in which the VM is running.","type":"string"},"name":{"description":"This is the name of the VM.","type":"string"},"offer":{"description":"This is the offer information for the VM image. This value is only present for images deployed from the Azure Image Gallery.","type":"string"},"osType":{"description":"This value indicates the type of OS the VM is running, either Linux or Windows.","type":"string"},"placementGroupId":{"description":"This is the placement group of your Virtual Machine Scale Set.","type":"string"},"plan":{"$ref":"#/components/schemas/PlanProperties"},"platformFaultDomain":{"description":"This is the fault domain in which the VM.","type":"string"},"platformUpdateDomain":{"description":"This is the update domain in which the VM.","type":"string"},"provider":{"description":"This is the provider of the VM.","type":"string"},"publicKeys":{"description":"This is information about the SSH certificate","items":{"$ref":"#/components/schemas/PublicKeysProperties"},"type":"array"},"publisher":{"description":"This is the publisher of the VM image.","type":"string"},"resourceGroupName":{"description":"This is the resource group for the VM.","type":"string"},"sku":{"description":"This is the specific SKU for the VM image.","type":"string"},"subscriptionId":{"description":"This is the Azure subscription for the VM.","type":"string"},"tags":{"description":"This is the list of tags for your VM.","type":"string"},"version":{"description":"This is the version of the VM image.","type":"string"},"vmId":{"description":"This is the unique identifier for the VM.","type":"string"},"vmScaleSetName":{"description":"This is the resource name of the VMSS.","type":"string"},"vmSize":{"description":"This is the size of the VM.","type":"string"},"zone":{"description":"This is the availability zone of the VM.","type":"string"}},"type":"object"},"ErrorResponse":{"description":"This is the response from an operation in the case an error occurs.","properties":{"error":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"IdentityErrorResponse":{"description":"This is the response from an Identity operation in the case an error occurs.","properties":{"error":{"description":"Error code","enum":["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","service_unavailable","bad_request","forbidden","not_found","method_not_allowed","too_many_requests"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Error"}},"error_description":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"IdentityInfoResponse":{"description":"This is the response from the Identity_GetInfo operation.","properties":{"tenantId":{"description":"This is the AAD tenantId of the identity of the caller.","type":"string"}},"type":"object"},"IdentityTokenResponse":{"description":"This is the response from the Identity_GetToken operation.","properties":{"access_token":{"description":"This is the requested access token. The app can use this token to authenticate to the sink resource.","type":"string"},"client_id":{"description":"This is the client_id specified in the request, if any.","type":"string"},"expires_in":{"description":"This is how long the access token is valid (in seconds).","type":"string"},"expires_on":{"description":"This is the time when the access token expires. The date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC until the expiration time. This value is used to determine the lifetime of cached tokens.","type":"string"},"ext_expires_in":{"description":"This indicates the extended lifetime of the token.","type":"string"},"msi_res_id":{"description":"This is the msi_res_id specified in the request, if any.","type":"string"},"not_before":{"description":"This is the time when the access token becomes effective. The date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC until the expiration time.","type":"string"},"object_id":{"description":"This is the object_id specified in the request, if any.","type":"string"},"resource":{"description":"This is the app ID URI of the sink resource.","type":"string"},"token_type":{"description":"This indicates the token type value.","type":"string"}},"type":"object"},"Instance":{"description":"This is the response from the Instance_GetMetadata operation.","properties":{"compute":{"$ref":"#/components/schemas/Compute"},"network":{"$ref":"#/components/schemas/Network"}},"type":"object"},"Ipv4Properties":{"description":"This contains the IPv4 properties.","properties":{"privateIpAddress":{"description":"This is the private IP address assigned to the interface.","type":"string"},"publicIpAddress":{"description":"This is the public IP address assigned to the interface.","type":"string"}},"type":"object"},"Ipv6Properties":{"description":"This contains the IPv6 properties.","properties":{"privateIpAddress":{"description":"This is the private IPv6 address assigned to the interface.","type":"string"}},"type":"object"},"Network":{"description":"Network Metadata","properties":{"interface":{"description":"This contains data about the network interface.","items":{"$ref":"#/components/schemas/NetworkInterface"},"type":"array"}},"type":"object"},"NetworkInterface":{"description":"This contains data about the network interface.","properties":{"ipv4":{"description":"This contains the IPv4 address.","properties":{"ipAddress":{"description":"This is the IP address","items":{"$ref":"#/components/schemas/Ipv4Properties"},"type":"array"},"subnet":{"description":"This is the subnet","items":{"$ref":"#/components/schemas/SubnetProperties"},"type":"array"}},"type":"object"},"ipv6":{"description":"This contains the IPv6 address.","properties":{"ipAddress":{"description":"This is the IP address","items":{"$ref":"#/components/schemas/Ipv6Properties"},"type":"array"}},"type":"object"},"macAddress":{"description":"This is the MAC address of the interface.","type":"string"}},"type":"object"},"PlanProperties":{"description":"This contains the data about the plan.","properties":{"name":{"description":"This is the Plan ID.","type":"string"},"product":{"description":"This is the product of the image from the Marketplace.","type":"string"},"publisher":{"description":"This is the publisher ID.","type":"string"}},"type":"object"},"PublicKeysProperties":{"description":"This contains the data about the public key.","properties":{"keyData":{"description":"This is the SSH public key certificate used to authenticate with the VM.","type":"string"},"path":{"description":"This specifies the full path on the VM where the SSH public key is stored.","type":"string"}},"type":"object"},"SubnetProperties":{"description":"This contains the properties of the subnet.","properties":{"address":{"description":"This is the address range of the subnet.","type":"string"},"prefix":{"description":"This is the prefix of the subnet.","type":"string"}},"type":"object"}}}}