Skip to content

Latest commit

 

History

History
757 lines (494 loc) · 30.3 KB

DatabaseTemplatesApi.md

File metadata and controls

757 lines (494 loc) · 30.3 KB

\DatabaseTemplatesApi

All URIs are relative to /v3

Method HTTP request Description
CreateDatabaseTemplate Post /database-templates Create a database template.
CreateDatabaseTemplateTags Post /database-templates/{databaseTemplateId}/tags Create tags for a DatabaseTemplate.
DeleteDatabaseTemplate Delete /database-templates/{databaseTemplateId} Delete a DatabaseTemplate by ID.
DeleteDatabaseTemplateTag Post /database-templates/{databaseTemplateId}/tags/delete Delete tags for a DatabaseTemplate.
GetDatabaseTemplateById Get /database-templates/{databaseTemplateId} Retrieve a DatabaseTemplate by ID.
GetDatabaseTemplateTags Get /database-templates/{databaseTemplateId}/tags Get tags for a DatabaseTemplate.
GetDatabaseTemplates Get /database-templates Retrieve the list of database templates.
ImportDatabaseTemplates Post /database-templates/import Imports the database templates from an an engine.
SearchDatabaseTemplates Post /database-templates/search Search DatabaseTemplates.
UndoImportDatabaseTemplates Post /database-templates/undo-import Undo an import of DatabaseTemplates on an Engine.
UpdateDatabaseTemplate Patch /database-templates/{databaseTemplateId} Updates a DatabaseTemplate by ID

CreateDatabaseTemplate

CreateDatabaseTemplateResponse CreateDatabaseTemplate(ctx).DatabaseTemplateCreateParameters(databaseTemplateCreateParameters).Execute()

Create a database template.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateCreateParameters := *openapiclient.NewDatabaseTemplateCreateParameters("template-name", "OracleVirtualSource") // DatabaseTemplateCreateParameters | The parameters to create a database template.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.CreateDatabaseTemplate(context.Background()).DatabaseTemplateCreateParameters(databaseTemplateCreateParameters).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.CreateDatabaseTemplate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateDatabaseTemplate`: CreateDatabaseTemplateResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.CreateDatabaseTemplate`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateDatabaseTemplateRequest struct via the builder pattern

Name Type Description Notes
databaseTemplateCreateParameters DatabaseTemplateCreateParameters The parameters to create a database template.

Return type

CreateDatabaseTemplateResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CreateDatabaseTemplateTags

TagsResponse CreateDatabaseTemplateTags(ctx, databaseTemplateId).TagsRequest(tagsRequest).Execute()

Create tags for a DatabaseTemplate.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateId := "databaseTemplateId_example" // string | The ID of the Database Template.
    tagsRequest := *openapiclient.NewTagsRequest([]openapiclient.Tag{*openapiclient.NewTag("key-1", "value-1")}) // TagsRequest | Tags information for a DatabaseTemplate.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.CreateDatabaseTemplateTags(context.Background(), databaseTemplateId).TagsRequest(tagsRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.CreateDatabaseTemplateTags``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateDatabaseTemplateTags`: TagsResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.CreateDatabaseTemplateTags`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseTemplateId string The ID of the Database Template.

Other Parameters

Other parameters are passed through a pointer to a apiCreateDatabaseTemplateTagsRequest struct via the builder pattern

Name Type Description Notes

tagsRequest | TagsRequest | Tags information for a DatabaseTemplate. |

Return type

TagsResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteDatabaseTemplate

DeleteDatabaseTemplateResponse DeleteDatabaseTemplate(ctx, databaseTemplateId).Execute()

Delete a DatabaseTemplate by ID.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateId := "databaseTemplateId_example" // string | The ID of the Database Template.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.DeleteDatabaseTemplate(context.Background(), databaseTemplateId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.DeleteDatabaseTemplate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteDatabaseTemplate`: DeleteDatabaseTemplateResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.DeleteDatabaseTemplate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseTemplateId string The ID of the Database Template.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDatabaseTemplateRequest struct via the builder pattern

Name Type Description Notes

Return type

DeleteDatabaseTemplateResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteDatabaseTemplateTag

DeleteDatabaseTemplateTag(ctx, databaseTemplateId).DeleteTag(deleteTag).Execute()

Delete tags for a DatabaseTemplate.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateId := "databaseTemplateId_example" // string | The ID of the Database Template.
    deleteTag := *openapiclient.NewDeleteTag() // DeleteTag | The parameters to delete tags (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.DatabaseTemplatesApi.DeleteDatabaseTemplateTag(context.Background(), databaseTemplateId).DeleteTag(deleteTag).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.DeleteDatabaseTemplateTag``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseTemplateId string The ID of the Database Template.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteDatabaseTemplateTagRequest struct via the builder pattern

Name Type Description Notes

deleteTag | DeleteTag | The parameters to delete tags |

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDatabaseTemplateById

DatabaseTemplate GetDatabaseTemplateById(ctx, databaseTemplateId).Execute()

Retrieve a DatabaseTemplate by ID.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateId := "databaseTemplateId_example" // string | The ID of the Database Template.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.GetDatabaseTemplateById(context.Background(), databaseTemplateId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.GetDatabaseTemplateById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDatabaseTemplateById`: DatabaseTemplate
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.GetDatabaseTemplateById`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseTemplateId string The ID of the Database Template.

Other Parameters

Other parameters are passed through a pointer to a apiGetDatabaseTemplateByIdRequest struct via the builder pattern

Name Type Description Notes

Return type

DatabaseTemplate

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDatabaseTemplateTags

TagsResponse GetDatabaseTemplateTags(ctx, databaseTemplateId).Execute()

Get tags for a DatabaseTemplate.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateId := "databaseTemplateId_example" // string | The ID of the Database Template.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.GetDatabaseTemplateTags(context.Background(), databaseTemplateId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.GetDatabaseTemplateTags``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDatabaseTemplateTags`: TagsResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.GetDatabaseTemplateTags`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseTemplateId string The ID of the Database Template.

Other Parameters

Other parameters are passed through a pointer to a apiGetDatabaseTemplateTagsRequest struct via the builder pattern

Name Type Description Notes

Return type

TagsResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetDatabaseTemplates

ListDatabaseTemplatesResponse GetDatabaseTemplates(ctx).Limit(limit).Cursor(cursor).Sort(sort).Execute()

Retrieve the list of database templates.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    limit := int32(50) // int32 | Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100. (optional) (default to 100)
    cursor := "cursor_example" // string | Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints. (optional)
    sort := "id" // string | The field to sort results by. A property name with a prepended '-' signifies descending order. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.GetDatabaseTemplates(context.Background()).Limit(limit).Cursor(cursor).Sort(sort).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.GetDatabaseTemplates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDatabaseTemplates`: ListDatabaseTemplatesResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.GetDatabaseTemplates`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetDatabaseTemplatesRequest struct via the builder pattern

Name Type Description Notes
limit int32 Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100. [default to 100]
cursor string Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints.
sort string The field to sort results by. A property name with a prepended '-' signifies descending order.

Return type

ListDatabaseTemplatesResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ImportDatabaseTemplates

ImportDatabaseTemplates(ctx).EngineIdBody(engineIdBody).Execute()

Imports the database templates from an an engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    engineIdBody := *openapiclient.NewEngineIdBody() // EngineIdBody | Body containing the ID of the registered engine.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.DatabaseTemplatesApi.ImportDatabaseTemplates(context.Background()).EngineIdBody(engineIdBody).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.ImportDatabaseTemplates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiImportDatabaseTemplatesRequest struct via the builder pattern

Name Type Description Notes
engineIdBody EngineIdBody Body containing the ID of the registered engine.

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SearchDatabaseTemplates

SearchDatabaseTemplatesResponse SearchDatabaseTemplates(ctx).Limit(limit).Cursor(cursor).Sort(sort).SearchBody(searchBody).Execute()

Search DatabaseTemplates.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    limit := int32(50) // int32 | Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100. (optional) (default to 100)
    cursor := "cursor_example" // string | Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints. (optional)
    sort := "id" // string | The field to sort results by. A property name with a prepended '-' signifies descending order. (optional)
    searchBody := *openapiclient.NewSearchBody() // SearchBody | A request body containing a filter expression. This enables searching for items matching arbitrarily complex conditions. The list of attributes which can be used in filter expressions is available in the x-filterable vendor extension.  # Filter Expression Overview **Note: All keywords are case-insensitive**  ## Comparison Operators | Operator | Description | Example | | --- | --- | --- | | CONTAINS | Substring or membership testing for string and list attributes respectively. | field3 CONTAINS 'foobar', field4 CONTAINS TRUE  | | IN | Tests if field is a member of a list literal. List can contain a maximum of 100 values | field2 IN ['Goku', 'Vegeta'] | | GE | Tests if a field is greater than or equal to a literal value | field1 GE 1.2e-2 | | GT | Tests if a field is greater than a literal value | field1 GT 1.2e-2 | | LE | Tests if a field is less than or equal to a literal value | field1 LE 9000 | | LT | Tests if a field is less than a literal value | field1 LT 9.02 | | NE | Tests if a field is not equal to a literal value | field1 NE 42 | | EQ | Tests if a field is equal to a literal value | field1 EQ 42 |  ## Search Operator The SEARCH operator filters for items which have any filterable attribute that contains the input string as a substring, comparison is done case-insensitively. This is not restricted to attributes with string values. Specifically `SEARCH '12'` would match an item with an attribute with an integer value of `123`.  ## Logical Operators Ordered by precedence. | Operator | Description | Example | | --- | --- | --- | | NOT | Logical NOT (Right associative) | NOT field1 LE 9000 | | AND | Logical AND (Left Associative) | field1 GT 9000 AND field2 EQ 'Goku' | | OR | Logical OR (Left Associative) | field1 GT 9000 OR field2 EQ 'Goku' |  ## Grouping Parenthesis `()` can be used to override operator precedence.  For example: NOT (field1 LT 1234 AND field2 CONTAINS 'foo')  ## Literal Values | Literal      | Description | Examples | | --- | --- | --- | | Nil | Represents the absence of a value | nil, Nil, nIl, NIL | | Boolean | true/false boolean | true, false, True, False, TRUE, FALSE | | Number | Signed integer and floating point numbers. Also supports scientific notation. | 0, 1, -1, 1.2, 0.35, 1.2e-2, -1.2e+2 | | String | Single or double quoted | \"foo\", \"bar\", \"foo bar\", 'foo', 'bar', 'foo bar' | | Datetime | Formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) | 2018-04-27T18:39:26.397237+00:00 | | List | Comma-separated literals wrapped in square brackets | [0], [0, 1], ['foo', \"bar\"] |  ## Limitations - A maximum of 8 unique identifiers may be used inside a filter expression.  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.SearchDatabaseTemplates(context.Background()).Limit(limit).Cursor(cursor).Sort(sort).SearchBody(searchBody).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.SearchDatabaseTemplates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `SearchDatabaseTemplates`: SearchDatabaseTemplatesResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.SearchDatabaseTemplates`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiSearchDatabaseTemplatesRequest struct via the builder pattern

Name Type Description Notes
limit int32 Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100. [default to 100]
cursor string Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints.
sort string The field to sort results by. A property name with a prepended '-' signifies descending order.
searchBody SearchBody A request body containing a filter expression. This enables searching for items matching arbitrarily complex conditions. The list of attributes which can be used in filter expressions is available in the x-filterable vendor extension. # Filter Expression Overview Note: All keywords are case-insensitive ## Comparison Operators Operator

Return type

SearchDatabaseTemplatesResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UndoImportDatabaseTemplates

UndoImportDatabaseTemplates(ctx).EngineIdBody(engineIdBody).Execute()

Undo an import of DatabaseTemplates on an Engine.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    engineIdBody := *openapiclient.NewEngineIdBody() // EngineIdBody | Body containing the ID of the registered engine.

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.DatabaseTemplatesApi.UndoImportDatabaseTemplates(context.Background()).EngineIdBody(engineIdBody).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.UndoImportDatabaseTemplates``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiUndoImportDatabaseTemplatesRequest struct via the builder pattern

Name Type Description Notes
engineIdBody EngineIdBody Body containing the ID of the registered engine.

Return type

(empty response body)

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateDatabaseTemplate

UpdateDatabaseTemplateResponse UpdateDatabaseTemplate(ctx, databaseTemplateId).UpdateDatabaseTemplateParameters(updateDatabaseTemplateParameters).Execute()

Updates a DatabaseTemplate by ID

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/delphix/dct-sdk-go"
)

func main() {
    databaseTemplateId := "databaseTemplateId_example" // string | The ID of the Database Template.
    updateDatabaseTemplateParameters := *openapiclient.NewUpdateDatabaseTemplateParameters() // UpdateDatabaseTemplateParameters | The new data to update a VDB. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.DatabaseTemplatesApi.UpdateDatabaseTemplate(context.Background(), databaseTemplateId).UpdateDatabaseTemplateParameters(updateDatabaseTemplateParameters).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `DatabaseTemplatesApi.UpdateDatabaseTemplate``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateDatabaseTemplate`: UpdateDatabaseTemplateResponse
    fmt.Fprintf(os.Stdout, "Response from `DatabaseTemplatesApi.UpdateDatabaseTemplate`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
databaseTemplateId string The ID of the Database Template.

Other Parameters

Other parameters are passed through a pointer to a apiUpdateDatabaseTemplateRequest struct via the builder pattern

Name Type Description Notes

updateDatabaseTemplateParameters | UpdateDatabaseTemplateParameters | The new data to update a VDB. |

Return type

UpdateDatabaseTemplateResponse

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]