domain

package
v0.20241209.1115630 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: MPL-2.0 Imports: 9 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/microsoft-graph/domains/beta/domain Documentation

The domain SDK allows for interaction with Microsoft Graph domains (API Version beta).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/microsoft-graph/domains/beta/domain"

Client Initialization

client := domain.NewDomainClientWithBaseURI("https://graph.microsoft.com")
client.Client.Authorizer = authorizer

Example Usage: DomainClient.CreateDomain

ctx := context.TODO()

payload := domain.Domain{
	// ...
}


read, err := client.CreateDomain(ctx, payload, domain.DefaultCreateDomainOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.CreateForceDelete

ctx := context.TODO()
id := domain.NewDomainID("domainId")

payload := domain.CreateForceDeleteRequest{
	// ...
}


read, err := client.CreateForceDelete(ctx, id, payload, domain.DefaultCreateForceDeleteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.CreatePromote

ctx := context.TODO()
id := domain.NewDomainID("domainId")

read, err := client.CreatePromote(ctx, id, domain.DefaultCreatePromoteOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.CreatePromoteToInitial

ctx := context.TODO()
id := domain.NewDomainID("domainId")

read, err := client.CreatePromoteToInitial(ctx, id, domain.DefaultCreatePromoteToInitialOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.CreateVerify

ctx := context.TODO()
id := domain.NewDomainID("domainId")

read, err := client.CreateVerify(ctx, id, domain.DefaultCreateVerifyOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.DeleteDomain

ctx := context.TODO()
id := domain.NewDomainID("domainId")

read, err := client.DeleteDomain(ctx, id, domain.DefaultDeleteDomainOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.GetDomain

ctx := context.TODO()
id := domain.NewDomainID("domainId")

read, err := client.GetDomain(ctx, id, domain.DefaultGetDomainOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.GetsCount

ctx := context.TODO()


read, err := client.GetsCount(ctx, domain.DefaultGetsCountOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DomainClient.ListDomains

ctx := context.TODO()


// alternatively `client.ListDomains(ctx, domain.DefaultListDomainsOperationOptions())` can be used to do batched pagination
items, err := client.ListDomainsComplete(ctx, domain.DefaultListDomainsOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DomainClient.UpdateDomain

ctx := context.TODO()
id := domain.NewDomainID("domainId")

payload := domain.Domain{
	// ...
}


read, err := client.UpdateDomain(ctx, id, payload, domain.DefaultUpdateDomainOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateDomainOperationOptions

type CreateDomainOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateDomainOperationOptions

func DefaultCreateDomainOperationOptions() CreateDomainOperationOptions

func (CreateDomainOperationOptions) ToHeaders

func (CreateDomainOperationOptions) ToOData

func (CreateDomainOperationOptions) ToQuery

type CreateDomainOperationResponse

type CreateDomainOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Domain
}

type CreateForceDeleteOperationOptions

type CreateForceDeleteOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateForceDeleteOperationOptions

func DefaultCreateForceDeleteOperationOptions() CreateForceDeleteOperationOptions

func (CreateForceDeleteOperationOptions) ToHeaders

func (CreateForceDeleteOperationOptions) ToOData

func (CreateForceDeleteOperationOptions) ToQuery

type CreateForceDeleteOperationResponse

type CreateForceDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateForceDeleteRequest

type CreateForceDeleteRequest struct {
	DisableUserAccounts nullable.Type[bool] `json:"disableUserAccounts,omitempty"`
}

type CreatePromoteOperationOptions

type CreatePromoteOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreatePromoteOperationOptions

func DefaultCreatePromoteOperationOptions() CreatePromoteOperationOptions

func (CreatePromoteOperationOptions) ToHeaders

func (CreatePromoteOperationOptions) ToOData

func (CreatePromoteOperationOptions) ToQuery

type CreatePromoteOperationResponse

type CreatePromoteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CreatePromoteResult
}

type CreatePromoteResult

type CreatePromoteResult struct {
	Value nullable.Type[bool] `json:"value,omitempty"`
}

type CreatePromoteToInitialOperationOptions

type CreatePromoteToInitialOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreatePromoteToInitialOperationOptions

func DefaultCreatePromoteToInitialOperationOptions() CreatePromoteToInitialOperationOptions

func (CreatePromoteToInitialOperationOptions) ToHeaders

func (CreatePromoteToInitialOperationOptions) ToOData

func (CreatePromoteToInitialOperationOptions) ToQuery

type CreatePromoteToInitialOperationResponse

type CreatePromoteToInitialOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type CreateVerifyOperationOptions

type CreateVerifyOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultCreateVerifyOperationOptions

func DefaultCreateVerifyOperationOptions() CreateVerifyOperationOptions

func (CreateVerifyOperationOptions) ToHeaders

func (CreateVerifyOperationOptions) ToOData

func (CreateVerifyOperationOptions) ToQuery

type CreateVerifyOperationResponse

type CreateVerifyOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Domain
}

type DeleteDomainOperationOptions

type DeleteDomainOperationOptions struct {
	IfMatch   *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultDeleteDomainOperationOptions

func DefaultDeleteDomainOperationOptions() DeleteDomainOperationOptions

func (DeleteDomainOperationOptions) ToHeaders

func (DeleteDomainOperationOptions) ToOData

func (DeleteDomainOperationOptions) ToQuery

type DeleteDomainOperationResponse

type DeleteDomainOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type DomainClient

type DomainClient struct {
	Client *msgraph.Client
}

func NewDomainClientWithBaseURI

func NewDomainClientWithBaseURI(sdkApi sdkEnv.Api) (*DomainClient, error)

func (DomainClient) CreateDomain

func (c DomainClient) CreateDomain(ctx context.Context, input beta.Domain, options CreateDomainOperationOptions) (result CreateDomainOperationResponse, err error)

CreateDomain - Create domain. Adds a domain to the tenant. Important: You cannot use an associated domain with your Microsoft Entra tenant until ownership is verified. See List verificationDnsRecords for details. Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified.

func (DomainClient) CreateForceDelete

CreateForceDelete - Invoke action forceDelete. Delete a domain using an asynchronous operation. Before performing this operation, you must update or remove any references to Exchange as the provisioning service. The following actions are performed as part of this operation: After the domain deletion completes, API operations for the deleted domain return a 404 HTTP response code. To verify deletion of a domain, you can perform a get domain. If the domain was successfully deleted, a 404 HTTP response code is returned in the response.

func (DomainClient) CreatePromote

CreatePromote - Invoke action promote. Promote a verified subdomain to the root domain. A verified domain has its isVerified property set to true.

func (DomainClient) CreatePromoteToInitial

CreatePromoteToInitial - Invoke action promoteToInitial

func (DomainClient) CreateVerify

CreateVerify - Invoke action verify. Validate the ownership of a domain.

func (DomainClient) DeleteDomain

DeleteDomain - Delete domain. Delete a domain from a tenant.

func (DomainClient) GetDomain

GetDomain - Get domain. Retrieve the properties and relationships of domain object.

func (DomainClient) GetsCount

GetsCount - Get the number of the resource

func (DomainClient) ListDomains

ListDomains - List domains. Retrieve a list of domain objects.

func (DomainClient) ListDomainsComplete

ListDomainsComplete retrieves all the results into a single object

func (DomainClient) ListDomainsCompleteMatchingPredicate

func (c DomainClient) ListDomainsCompleteMatchingPredicate(ctx context.Context, options ListDomainsOperationOptions, predicate DomainOperationPredicate) (result ListDomainsCompleteResult, err error)

ListDomainsCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DomainClient) UpdateDomain

UpdateDomain - Update domain. Update the properties of domain object. Only verified domains can be updated.

type DomainOperationPredicate

type DomainOperationPredicate struct {
}

func (DomainOperationPredicate) Matches

func (p DomainOperationPredicate) Matches(input beta.Domain) bool

type GetDomainOperationOptions

type GetDomainOperationOptions struct {
	Expand    *odata.Expand
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Select    *[]string
}

func DefaultGetDomainOperationOptions

func DefaultGetDomainOperationOptions() GetDomainOperationOptions

func (GetDomainOperationOptions) ToHeaders

func (o GetDomainOperationOptions) ToHeaders() *client.Headers

func (GetDomainOperationOptions) ToOData

func (o GetDomainOperationOptions) ToOData() *odata.Query

func (GetDomainOperationOptions) ToQuery

type GetDomainOperationResponse

type GetDomainOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *beta.Domain
}

type GetsCountOperationOptions

type GetsCountOperationOptions struct {
	Filter    *string
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
	Search    *string
}

func DefaultGetsCountOperationOptions

func DefaultGetsCountOperationOptions() GetsCountOperationOptions

func (GetsCountOperationOptions) ToHeaders

func (o GetsCountOperationOptions) ToHeaders() *client.Headers

func (GetsCountOperationOptions) ToOData

func (o GetsCountOperationOptions) ToOData() *odata.Query

func (GetsCountOperationOptions) ToQuery

type GetsCountOperationResponse

type GetsCountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]byte
}

type ListDomainsCompleteResult

type ListDomainsCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []beta.Domain
}

type ListDomainsCustomPager

type ListDomainsCustomPager struct {
	NextLink *odata.Link `json:"@odata.nextLink"`
}
func (p *ListDomainsCustomPager) NextPageLink() *odata.Link

type ListDomainsOperationOptions

type ListDomainsOperationOptions struct {
	Count     *bool
	Expand    *odata.Expand
	Filter    *string
	Metadata  *odata.Metadata
	OrderBy   *odata.OrderBy
	RetryFunc client.RequestRetryFunc
	Search    *string
	Select    *[]string
	Skip      *int64
	Top       *int64
}

func DefaultListDomainsOperationOptions

func DefaultListDomainsOperationOptions() ListDomainsOperationOptions

func (ListDomainsOperationOptions) ToHeaders

func (ListDomainsOperationOptions) ToOData

func (ListDomainsOperationOptions) ToQuery

type ListDomainsOperationResponse

type ListDomainsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]beta.Domain
}

type UpdateDomainOperationOptions

type UpdateDomainOperationOptions struct {
	Metadata  *odata.Metadata
	RetryFunc client.RequestRetryFunc
}

func DefaultUpdateDomainOperationOptions

func DefaultUpdateDomainOperationOptions() UpdateDomainOperationOptions

func (UpdateDomainOperationOptions) ToHeaders

func (UpdateDomainOperationOptions) ToOData

func (UpdateDomainOperationOptions) ToQuery

type UpdateDomainOperationResponse

type UpdateDomainOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL