openapi: 3.0.0 info: title: OpenStorage SDK OpenStorageAlerts OpenStorageCredentials API version: 0.186.0 security: - bearerAuth: [] tags: - name: OpenStorageCredentials paths: /v1/credentials: get: operationId: OpenStorageCredentials_Enumerate responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialEnumerateResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: Enumerate returns a list of credential ids tags: - OpenStorageCredentials post: description: "##### Example\n{% codetabs name=\"Golang\", type=\"go\" -%}\nid, err := client.Create(context.Background(), &api.SdkCredentialCreateRequest{\n Name: \"awscred\",\n UseProxy: false,\n CredentialType: &api.SdkCredentialCreateRequest_AwsCredential{\n AwsCredential: &api.SdkAwsCredentialRequest{\n AccessKey: \"dummy-access\",\n SecretKey: \"dummy-secret\",\n Endpoint: \"dummy-endpoint\",\n Region: \"dummy-region\",\n },\n },\n})\n{%- language name=\"Python\", type=\"py\" -%}\nen_resp = client.Create(api_pb2.SdkCredentialCreateRequest(\n name='awscred',\n aws_credential=api_pb2.SdkAwsCredentialRequest(\n access_key='dummy-access',\n secret_key='dumm-secret',\n endpoint='dummy-endpoint',\n region='dummy-region')))\n{%- endcodetabs %}" operationId: OpenStorageCredentials_Create requestBody: content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialCreateRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialCreateResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: 'Create is used to submit cloud credentials. It will return an id of the credentials once they are verified to work.' tags: - OpenStorageCredentials /v1/credentials/inspect/{credential_id}: get: operationId: OpenStorageCredentials_Inspect parameters: - description: Id of the credential in: path name: credential_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialInspectResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: Inspect returns the information about a credential, but does not return the secret key. tags: - OpenStorageCredentials /v1/credentials/references/{credential_id}: delete: operationId: OpenStorageCredentials_DeleteReferences parameters: - description: Id of the credentials in: path name: credential_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialDeleteReferencesResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: DeleteReferences is used to remove references to credentials tags: - OpenStorageCredentials /v1/credentials/validate/{credential_id}: get: operationId: OpenStorageCredentials_Validate parameters: - description: Id of the credentials in: path name: credential_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialValidateResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: Validate is used to validate credentials tags: - OpenStorageCredentials /v1/credentials/{credential_id}: delete: operationId: OpenStorageCredentials_Delete parameters: - description: Id for credentials in: path name: credential_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialDeleteResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: Delete a specified credential tags: - OpenStorageCredentials put: operationId: OpenStorageCredentials_Update parameters: - in: path name: credential_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialUpdateRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/apiSdkCredentialUpdateResponse' description: A successful response. default: content: application/json: schema: $ref: '#/components/schemas/runtimeError' description: An unexpected error response. summary: input is very same as credential create tags: - OpenStorageCredentials components: schemas: apiSdkNfsCredentialResponse: properties: mount_opts: title: mount options ( "," separated) type: string server: title: NFS Server Address type: string sub_path: title: NFS export path type: string timeout_seconds: format: int64 title: timeout in seconds type: integer title: Defines the response for NFS credential type: object apiSdkCredentialEnumerateResponse: properties: credential_ids: items: type: string title: List of credentials type: array title: Defines response for a enumeration of credentials type: object apiSdkAwsCredentialRequest: properties: access_key: title: Access key type: string disable_path_style: title: (optional) Disable path-style access type: boolean disable_ssl: title: (optional) Disable SSL connection type: boolean endpoint: title: Endpoint type: string region: title: Region type: string secret_key: title: Secret key type: string server_side_encryption: title: (optional) server side encryption type: string title: Defines credentials for Aws/S3 endpoints type: object OwnershipAccessType: default: Read description: "Access types can be set by owner to have different levels of access to\na resource.\n\nIt is up to the resource to interpret what the types mean and are\nused for.\n\n - Read: Read access only and cannot affect the resource.\n - Write: Write access and can affect the resource.\nThis type automatically provides Read access also.\n - Admin: Administrator access.\nThis type automatically provides Read and Write access also." enum: - Read - Write - Admin type: string OwnershipPublicAccessControl: properties: type: $ref: '#/components/schemas/OwnershipAccessType' title: PublicAccessControl allows assigning public ownership type: object apiSdkGoogleCredentialRequest: properties: json_key: title: JSON Key type: string project_id: title: Project ID type: string title: Defines credentials for Google type: object apiSdkCredentialCreateRequest: properties: aws_credential: $ref: '#/components/schemas/apiSdkAwsCredentialRequest' azure_credential: $ref: '#/components/schemas/apiSdkAzureCredentialRequest' bucket: title: (optional) Name of bucket type: string encryption_key: title: (optional) Key used to encrypt the data type: string google_credential: $ref: '#/components/schemas/apiSdkGoogleCredentialRequest' iam_policy: title: iamPolicy indicates if IAM creds must be used for access type: boolean name: title: Name of the credential type: string nfs_credential: $ref: '#/components/schemas/apiSdkNfsCredentialRequest' ownership: $ref: '#/components/schemas/apiOwnership' s3_storage_class: title: s3StorageClass for object puts, empty indicates default STANDARD type: string use_proxy: title: use_proxy indicates if a proxy must be used type: boolean title: Defines a request to create credentials type: object apiSdkCredentialUpdateResponse: title: Defines response for credential update type: object apiSdkCredentialInspectResponse: description: 'Defines the response to an inspection of a credential. This response uses OneOf proto style. Depending on your programming language you will need to check if the value of credential_type is one of the ones below.' properties: aws_credential: $ref: '#/components/schemas/apiSdkAwsCredentialResponse' azure_credential: $ref: '#/components/schemas/apiSdkAzureCredentialResponse' bucket: title: (optional) Name of bucket type: string credential_id: title: Credential id type: string google_credential: $ref: '#/components/schemas/apiSdkGoogleCredentialResponse' iam_policy: title: iamPolicy indicates if IAM creds must be used for access type: boolean name: title: Name of the credential type: string nfs_credential: $ref: '#/components/schemas/apiSdkNfsCredentialResponse' ownership: $ref: '#/components/schemas/apiOwnership' use_proxy: title: proxy flag for the credential type: boolean type: object apiSdkGoogleCredentialResponse: properties: project_id: title: Project ID type: string title: Defines the response for Google credentials type: object apiSdkCredentialDeleteReferencesResponse: title: Empty response type: object apiSdkCredentialValidateResponse: title: Empty response type: object apiSdkCredentialDeleteResponse: title: Empty response type: object apiOwnership: description: 'Ownership information for resource. Administrators are users who belong to the group `*`, meaning, every group.' properties: acls: $ref: '#/components/schemas/OwnershipAccessControl' owner: description: 'Username of owner. The storage system uses the username taken from the security authorization token and is saved on this field. Only users with system administration can edit this value.' type: string type: object apiSdkAzureCredentialResponse: properties: account_name: title: Account name type: string title: Defines the response for Azure credentials type: object apiSdkCredentialCreateResponse: properties: credential_id: title: Id of the credentials type: string title: Defines a response from creating a credential type: object runtimeError: properties: code: format: int32 type: integer details: items: $ref: '#/components/schemas/protobufAny' type: array error: type: string message: type: string type: object apiSdkAwsCredentialResponse: properties: access_key: title: Access key type: string disable_path_style: title: (optional) Disable path-style access type: boolean disable_ssl: title: (optional) Disable SSL connection type: boolean endpoint: title: Endpoint type: string region: title: Region type: string s3_storage_class: title: (optional) Storage class for s3 puts type: string server_side_encryption: title: (optional) server side encryption type: string title: Defines the response for AWS/S3 credentials type: object apiSdkCredentialUpdateRequest: properties: credential_id: type: string update_req: $ref: '#/components/schemas/apiSdkCredentialCreateRequest' title: Defines request for credential update type: object apiSdkAzureCredentialRequest: properties: account_key: title: Account key type: string account_name: title: Account name type: string title: Defines credentials for Azure type: object protobufAny: properties: type_url: type: string value: format: byte type: string type: object apiSdkNfsCredentialRequest: properties: mount_opts: title: mount options for nfs mount type: string server: title: NFS Server address type: string sub_path: title: NFS export path type: string timeout_seconds: format: int64 title: timeout for nfs IO in seconds type: integer title: Defines credentials for NFS type: object OwnershipAccessControl: properties: collaborators: additionalProperties: $ref: '#/components/schemas/OwnershipAccessType' description: 'Collaborator access to resource gives access to other user. Must be the username (unique id) set in the authorization token. The owner or the administrator can set this value. Possible values are: 1. no collaborators: Means no users are given access. 2. `["*"]`: All users are allowed. 3. `["username1", "username2"]`: Only certain usernames are allowed. In this example only _username1_ and _username2_ are allowed.' type: object groups: additionalProperties: $ref: '#/components/schemas/OwnershipAccessType' description: 'Group access to resource which must match the group set in the authorization token. Can be set by the owner or the system administrator only. Possible values are: 1. no groups: Means no groups are given access. 2. `["*"]`: All groups are allowed. 3. `["group1", "group2"]`: Only certain groups are allowed. In this example only _group1_ and _group2_ are allowed.' type: object public: $ref: '#/components/schemas/OwnershipPublicAccessControl' type: object securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT