Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: spo site ensure #1404

Closed
waldekmastykarz opened this issue Mar 10, 2020 · 4 comments
Closed

New command: spo site ensure #1404

waldekmastykarz opened this issue Mar 10, 2020 · 4 comments

Comments

@waldekmastykarz
Copy link
Member

waldekmastykarz commented Mar 10, 2020

Usage

spo site ensure [options]

Description

Ensures that the particular site collection exists and updates its properties if necessary. The command is a combination of spo site get, spo site add and spo site set.

Options

Option Description
--help output usage information
-u, --url <url> URL of the site collection to work with
--type [type] Type of site. Allowed values TeamSite,CommunicationSite, default TeamSite
-a, --alias [alias] Site alias, used in the URL and in the team site group e-mail (applies only to team sites)
-t, --title [title] Site title
-d, --description [description] Site description
-c, --classification [classification] Site classification
-l, --lcid [lcid] Site language in the LCID format, eg. 1033 for en-US
--isPublic Determines if the associated group is public or not (applies only to team sites)
--shareByEmailEnabled [shareByEmailEnabled] Set to true to allow to share files with guests (applies only to communication sites)
--siteDesign [siteDesign] Type of communication site to create. Allowed values Topic,Showcase,Blank, default Topic. When creating a communication site, specify either siteDesign or siteDesignId (applies only to communication sites)
--siteDesignId [siteDesignId] Id of the custom site design to use to create the site. When creating a communication site, specify either siteDesign or siteDesignId (applies only to communication sites)
--owners [owners] Comma-separated list of users to set as site owners (applies only to team sites)
--classification [classification] The classification for the site collection
--disableFlows [disableFlows] Set to true to disable using Microsoft Flow in this site collection
--query [query] JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output] Output type. json,text. Default text
--pretty Prettifies json output
--verbose Runs command with verbose logging
--debug Runs command with debug logging

Additional Information

If you specify the type option and the template of the existing site doesn't match it, the command will return an error. If you don't specify type and the site already exists, the command will not validate the type. If you don't specify type and no site exists at the specified URL, the command will create a team site (default value).

If you set the type option to TeamSite or don't specify it, you must specify the alias option which is required to create a team site if it doesn't exist.

If you specify the lcid option and the language of the existing site doesn't match it, the command will return an error.

If the specified site already exists, options alias, siteDesign and siteDesignId are ignored because they're used only for site creation.


@garrytrinder @VelinGeorgiev looking forward to your feedback on the spec

@waldekmastykarz waldekmastykarz added new feature needs peer review Needs second pair of eyes to review the spec or PR labels Mar 10, 2020
@waldekmastykarz waldekmastykarz self-assigned this Mar 10, 2020
@VelinGeorgiev
Copy link
Contributor

Looks great! Thank you!

@garrytrinder
Copy link
Member

Looks good to me 👍🏻

The descriptions for type, siteDesign and output need updating though, I think these are copy and paste issues from the docs 😊

@waldekmastykarz
Copy link
Member Author

@garrytrinder good catch and fixed. Seems like MkDocs is more forgiving than GitHub MD.

@waldekmastykarz waldekmastykarz removed the needs peer review Needs second pair of eyes to review the spec or PR label Mar 11, 2020
@waldekmastykarz
Copy link
Member Author

Before we can start implementing this command, we need to extend the spo site set command with additional options so that it's as close as possible to the spo site add command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants